Hash :
6a5be910
Author :
Date :
2020-12-29T17:08:11
canonicalize: fix ptrdiff_t overflow bug Problem reported by Adhemerval Zanella in: https://sourceware.org/pipermail/libc-alpha/2020-December/121182.html * lib/canonicalize-lgpl.c, lib/canonicalize.c: Include intprops.h. (NARROW_ADDRESSES): New constant. * lib/canonicalize-lgpl.c (realpath_stk):m * lib/canonicalize.c (canonicalize_filename_mode_stk): Work even if strlen (END) does not fit in idx_t, or if adding N to it overflows. * modules/canonicalize, modules/canonicalize-lgpl (Depends-on): Add intprops.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
Description:
Return the canonical absolute name of a given file.
Files:
lib/canonicalize.h
lib/canonicalize.c
m4/canonicalize.m4
m4/lstat.m4
Depends-on:
attribute
double-slash-root
errno
extensions
fcntl-h
file-set
filename
free-posix
getcwd
hash-triple-simple
idx
intprops
memmove
mempcpy
nocrash
rawmemchr
readlink
scratch_buffer
stat
stdbool
sys_stat
xalloc
xalloc-die
configure.ac:
gl_FUNC_CANONICALIZE_FILENAME_MODE
gl_MODULE_INDICATOR([canonicalize])
gl_MODULE_INDICATOR_FOR_TESTS([canonicalize])
gl_STDLIB_MODULE_INDICATOR([canonicalize_file_name])
Makefile.am:
lib_SOURCES += canonicalize.c
Include:
"canonicalize.h"
License:
GPL
Maintainer:
Jim Meyering