aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstddjb/alloc_realloc.c
Commit message (Collapse)AuthorAgeFilesLines
* Do not free on failure to reallocate to size 0 (lol.)Laurent Bercot2024-01-181-1/+2
| | | | Signed-off-by: Laurent Bercot <ska@appnovation.com>
* Fix alloc_realloc UBLaurent Bercot2020-04-291-2/+2
| | | | | | | | | | | | | void ** does not exist: the address of a generic pointer is not properly defined (different pointer types may have different representations). So, alloc_realloc cannot exist as is without UB. Fortunately, it's not supposed to be used in the skalibs programming style, and skalibs itself only uses it in two places (stralloc_ready_tuned and stralloc_shrink) where the pointer is a char *. So we just fix the UB by making alloc_realloc() take a char **, and it's only defined for that pointer type. Nothing to see here folks, nothing happened at all.
* We're down to ONE rogue sysdep, boys. ONE.Laurent Bercot2019-09-201-0/+12