]> Savannah Git Hosting - gnulib.git/commit
xmalloca, etc.: avoid unlikely trap
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 25 Apr 2021 01:13:40 +0000 (18:13 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 25 Apr 2021 01:14:06 +0000 (18:14 -0700)
commit724f02cffadca0f63828537d018247f48ee115c0
tree9b99b281db18c575d5294bf8eb1cc32887ee2023
parentcc98a5e2fd16ae8589deea9dbd71be59b6f77305
xmalloca, etc.: avoid unlikely trap

* lib/xmalloca.h (xnmalloca):
Use size_t, not ptrdiff_t, to avoid implementation-defined
behavior (which could include a trap) if N is 0 and S exceeds
PTRDIFF_MAX.
* lib/xalloc-oversized.h: Adjust comment to match.
ChangeLog
lib/xalloc-oversized.h
lib/xmalloca.h