mbox series

[v3,0/3] strlcpy and strlcat, wcslcpy and wcslcat

Message ID cover.1686742926.git.fweimer@redhat.com
Headers show
Series strlcpy and strlcat, wcslcpy and wcslcat | expand

Message

Florian Weimer June 14, 2023, 11:43 a.m. UTC
This series is mostly a repost of the previous submission.

It implements Siddhesh's suggestion to use wide character counts in the
_chk functions, like the existing functions.

Tested on i686-linux-gnu and x86_64-linux-gnu.

Thanks,
Florian

Florian Weimer (2):
  Implement strlcpy and strlcat [BZ #178]
  Add the wcslcpy, wcslcat functions

Paul Eggert (1):
  manual: Manual update for strlcat, strlcpy, wcslcat, wclscpy

 NEWS                                          |  3 +
 debug/Makefile                                |  4 +
 debug/Versions                                |  6 ++
 debug/strlcat_chk.c                           | 31 ++++++
 debug/strlcpy_chk.c                           | 31 ++++++
 debug/tst-fortify.c                           | 48 ++++++++++
 debug/wcslcat_chk.c                           | 31 ++++++
 debug/wcslcpy_chk.c                           | 31 ++++++
 include/string.h                              |  4 +
 include/wchar.h                               |  5 +
 manual/maint.texi                             |  8 ++
 manual/string.texi                            | 96 ++++++++++++++++++-
 string/Makefile                               |  4 +
 string/Versions                               |  4 +
 string/bits/string_fortified.h                | 36 +++++++
 string/string.h                               | 13 +++
 string/strlcat.c                              | 59 ++++++++++++
 string/strlcpy.c                              | 46 +++++++++
 string/tst-strlcat.c                          | 84 ++++++++++++++++
 string/tst-strlcpy.c                          | 68 +++++++++++++
 sysdeps/mach/hurd/i386/libc.abilist           |  8 ++
 sysdeps/unix/sysv/linux/aarch64/libc.abilist  |  8 ++
 sysdeps/unix/sysv/linux/alpha/libc.abilist    |  8 ++
 sysdeps/unix/sysv/linux/arc/libc.abilist      |  8 ++
 sysdeps/unix/sysv/linux/arm/be/libc.abilist   |  8 ++
 sysdeps/unix/sysv/linux/arm/le/libc.abilist   |  8 ++
 sysdeps/unix/sysv/linux/csky/libc.abilist     |  8 ++
 sysdeps/unix/sysv/linux/hppa/libc.abilist     |  8 ++
 sysdeps/unix/sysv/linux/i386/libc.abilist     |  8 ++
 sysdeps/unix/sysv/linux/ia64/libc.abilist     |  8 ++
 .../sysv/linux/loongarch/lp64/libc.abilist    |  8 ++
 .../sysv/linux/m68k/coldfire/libc.abilist     |  8 ++
 .../unix/sysv/linux/m68k/m680x0/libc.abilist  |  8 ++
 .../sysv/linux/microblaze/be/libc.abilist     |  8 ++
 .../sysv/linux/microblaze/le/libc.abilist     |  8 ++
 .../sysv/linux/mips/mips32/fpu/libc.abilist   |  8 ++
 .../sysv/linux/mips/mips32/nofpu/libc.abilist |  8 ++
 .../sysv/linux/mips/mips64/n32/libc.abilist   |  8 ++
 .../sysv/linux/mips/mips64/n64/libc.abilist   |  8 ++
 sysdeps/unix/sysv/linux/nios2/libc.abilist    |  8 ++
 sysdeps/unix/sysv/linux/or1k/libc.abilist     |  8 ++
 .../linux/powerpc/powerpc32/fpu/libc.abilist  |  8 ++
 .../powerpc/powerpc32/nofpu/libc.abilist      |  8 ++
 .../linux/powerpc/powerpc64/be/libc.abilist   |  8 ++
 .../linux/powerpc/powerpc64/le/libc.abilist   |  8 ++
 .../unix/sysv/linux/riscv/rv32/libc.abilist   |  8 ++
 .../unix/sysv/linux/riscv/rv64/libc.abilist   |  8 ++
 .../unix/sysv/linux/s390/s390-32/libc.abilist |  8 ++
 .../unix/sysv/linux/s390/s390-64/libc.abilist |  8 ++
 sysdeps/unix/sysv/linux/sh/be/libc.abilist    |  8 ++
 sysdeps/unix/sysv/linux/sh/le/libc.abilist    |  8 ++
 .../sysv/linux/sparc/sparc32/libc.abilist     |  8 ++
 .../sysv/linux/sparc/sparc64/libc.abilist     |  8 ++
 .../unix/sysv/linux/x86_64/64/libc.abilist    |  8 ++
 .../unix/sysv/linux/x86_64/x32/libc.abilist   |  8 ++
 wcsmbs/Makefile                               |  4 +
 wcsmbs/Versions                               |  2 +
 wcsmbs/bits/wchar2.h                          | 39 ++++++++
 wcsmbs/tst-wcslcat.c                          | 93 ++++++++++++++++++
 wcsmbs/tst-wcslcpy.c                          | 78 +++++++++++++++
 wcsmbs/wchar.h                                | 13 +++
 wcsmbs/wcslcat.c                              | 60 ++++++++++++
 wcsmbs/wcslcpy.c                              | 46 +++++++++
 63 files changed, 1224 insertions(+), 3 deletions(-)
 create mode 100644 debug/strlcat_chk.c
 create mode 100644 debug/strlcpy_chk.c
 create mode 100644 debug/wcslcat_chk.c
 create mode 100644 debug/wcslcpy_chk.c
 create mode 100644 string/strlcat.c
 create mode 100644 string/strlcpy.c
 create mode 100644 string/tst-strlcat.c
 create mode 100644 string/tst-strlcpy.c
 create mode 100644 wcsmbs/tst-wcslcat.c
 create mode 100644 wcsmbs/tst-wcslcpy.c
 create mode 100644 wcsmbs/wcslcat.c
 create mode 100644 wcsmbs/wcslcpy.c


base-commit: 85e6d8b4175fcb195011a0a1bad37d6f3b2355db