glibc/sysdeps
H.J. Lu f981bf6b9d parse_fdinfo: Don't advance pointer twice [BZ #31798]
pidfd_getpid.c has

      /* Ignore invalid large values.  */
      if (INT_MULTIPLY_WRAPV (10, n, &n)
          || INT_ADD_WRAPV (n, *l++ - '0', &n))
        return -1;

For GCC older than GCC 7, INT_ADD_WRAPV(a, b, r) is defined as

   _GL_INT_OP_WRAPV (a, b, r, +, _GL_INT_ADD_RANGE_OVERFLOW)

and *l++ - '0' is evaluated twice.  Fix BZ #31798 by moving "l++" out of
the if statement.  Tested with GCC 6.4 and GCC 14.1.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2024-05-27 06:52:45 -07:00
..
aarch64 aarch64: Remove duplicate memchr/strlen in libc.a (BZ 31777) 2024-05-23 09:36:08 -03:00
alpha string: Use builtins for ffs and ffsll 2024-02-01 09:31:33 -03:00
arc login: Check default sizes of structs utmp, utmpx, lastlog 2024-04-19 14:38:17 +02:00
arm arm: Update ulps 2024-05-20 13:12:23 -03:00
csky login: structs utmp, utmpx, lastlog _TIME_BITS independence (bug 30701) 2024-04-19 14:38:17 +02:00
generic login: Check default sizes of structs utmp, utmpx, lastlog 2024-04-19 14:38:17 +02:00
gnu login: Use unsigned 32-bit types for seconds-since-epoch 2024-04-19 14:38:17 +02:00
hppa login: Check default sizes of structs utmp, utmpx, lastlog 2024-04-19 14:38:17 +02:00
htl htl: Implement some support for TLS_DTV_AT_TP 2024-03-23 23:00:30 +01:00
hurd hurd: Move internal functions to internal header 2024-03-23 22:43:07 +01:00
i386 math: Fix i386 and m68k exp10 on static build (BZ 31775) 2024-05-21 13:44:22 -03:00
ieee754 sysdeps/ieee754/ldbl-opt/Makefile: Split and sort libnldbl-calls 2024-05-24 10:25:40 -07:00
loongarch loongarch: Remove duplicate strnlen in libc.a (BZ 31785) 2024-05-23 09:36:08 -03:00
m68k math: Fix i386 and m68k exp10 on static build (BZ 31775) 2024-05-21 13:44:22 -03:00
mach Implement C23 log2p1 2024-05-20 13:41:39 +00:00
microblaze login: structs utmp, utmpx, lastlog _TIME_BITS independence (bug 30701) 2024-04-19 14:38:17 +02:00
mips login: structs utmp, utmpx, lastlog _TIME_BITS independence (bug 30701) 2024-04-19 14:38:17 +02:00
nios2 login: structs utmp, utmpx, lastlog _TIME_BITS independence (bug 30701) 2024-04-19 14:38:17 +02:00
nptl Always define __USE_TIME_BITS64 when 64 bit time_t is used 2024-04-02 15:28:36 -03:00
or1k or1k: Add hard float support 2024-05-03 18:28:18 +01:00
posix posix: Sync tempname with gnulib 2024-04-10 14:53:39 -03:00
powerpc powerpc: Remove duplicated llrintf and llrintf32 from libm.a (BZ 31787) 2024-05-23 09:36:08 -03:00
pthread Add crt1-2.0.o for glibc 2.0 compatibility tests 2024-05-06 07:49:40 -07:00
riscv login: Check default sizes of structs utmp, utmpx, lastlog 2024-04-19 14:38:17 +02:00
s390 s390x: Regenerate ULPs. 2024-05-24 09:53:49 +02:00
sh login: structs utmp, utmpx, lastlog _TIME_BITS independence (bug 30701) 2024-04-19 14:38:17 +02:00
sparc elf: Only process multiple tunable once (BZ 31686) 2024-05-07 12:16:36 -03:00
unix parse_fdinfo: Don't advance pointer twice [BZ #31798] 2024-05-27 06:52:45 -07:00
wordsize-32 Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
wordsize-64 Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
x86 support: Add envp argument to support_capture_subprogram 2024-05-07 12:16:36 -03:00
x86_64 Implement C23 log2p1 2024-05-20 13:41:39 +00:00