]> Savannah Git Hosting - gnulib.git/commit
obstack: use size_t alignments and check for overflow
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 29 Oct 2014 06:58:42 +0000 (23:58 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 29 Oct 2014 07:23:39 +0000 (00:23 -0700)
commit6c34297a9143b66bd69a1748a59662c45257f5f6
treec404193becb163f64725d6cca722f7d098987903
parent82a38a0d7776d99e7afc03e0d8df93fa253f1e35
obstack: use size_t alignments and check for overflow

* lib/obstack.c, lib/obstack.h (_obstack_begin, _obstack_begin_1):
* lib/obstack.c (_obstack_begin_worker, _obstack_newchunk):
* lib/obstack.h (struct obstack.alignment_mask):
Use _OBSTACK_SIZE_T, not int, for alignments.
* lib/obstack.c (_obstack_newchunk): Fail if the size calculation
overflows, e.g., when adding the alignment.
ChangeLog
lib/obstack.c
lib/obstack.h