| Age | Commit message (Collapse) | Author |
|
Like it's already done for memcpy and memmove. Add tests as well,
to prove that nothing broke.
|
|
__d is a char * destination buffer, so __b is already the byte capacity.
Dividing by sizeof(wchar_t) makes no sense here, it was likely copy-pasted
from mbsnrtowcs (where the destination is wchar_t *). The first branch also
fails to limit __n (the byte write cap) to __b, so overflows are possible when
a wide character produces multi-byte output. The second branch (else) correctly
limits __n to __b.
This commit replaces the broken two-branch logic with the simple correct
pattern matching wcsrtombs, and adds two tests two prove that nothing broke.
|
|
The manpage says that stpncpy will "copy non-null bytes from the string pointed
to by src into the array pointed to by dst.", it doesn't add a terminal NULL
byte, so we shouldn't check for it.
|
|
This was fixed in a255506ca487250255f9f048e61cf90166ceab77
|
|
Fixes CXXFLAGS missing -I../include/ and avoids similar issues to happen
in the future
|
|
Exposes bug in c++ compile test which do not include fortify-headers
|
|
As explained in `man realpath(3)`:
> The POSIX.1-2001 standard version of this function is broken by design,
> since it is impossible to determine a suitable size for the output
> buffer, resolved_path. According to POSIX.1-2001 a buffer of size PATH_MAX
> suffices, but PATH_MAX need not be a defined constant, and may have to be
> obtained using pathconf(3). And asking pathconf(3) does not really help,
> since, on the one hand POSIX warns that the result of pathconf(3) may be huge
> and unsuitable for mallocing memory, and on the other hand pathconf(3) may
> return -1 to signify that PATH_MAX is not bounded. The re‐ solved_path
> == NULL feature, not standardized in POSIX.1-2001, but standardized in
> POSIX.1-2008, allows this design problem to be avoided.
So we can either not compile, or be pragmatic, and define PATH_MAX to a sane
value, like 4096, which is the one used on Linux and some/most BSD.
This commit also adds two tests to ensure that things aren't catastrophically
broken by this change.
|
|
Notably -Wno-fortify-source, to prevent clang from using its own fortify
implementation.
Co-Authored-By: Sertonix
|
|
This commit fixes the typo pass_object_size__ for pass_object_size. It also
adds tests in the CI to prevent this from happening again.
Ref https://clang.llvm.org/docs/AttributeReference.html#pass-object-size-pass-dynamic-object-size
Co-Authored-By: Sertonix
|
|
Co-Authored-By: q66 <q66@chimera-linux.org>
|