array: Avoid overflow in size calculation
authorTobias Brunner <tobias@strongswan.org>
Tue, 28 Jan 2020 10:06:59 +0000 (11:06 +0100)
committerTobias Brunner <tobias@strongswan.org>
Tue, 28 Jan 2020 14:29:40 +0000 (15:29 +0100)
commit7bcbf20b3d3f851a541cf3381bac1ddef04f1488
treed428589b464230fcf44a87374aa0b6eb22ba7f6c
parent73ee7b666482712cebd13af6760fef6293d97a0e
array: Avoid overflow in size calculation

While it's unlikely that so many (large) items are allocated, this is
technically more correct.  The result previously could overflow an
unsigned int (the conversion to size_t happened afterwards).
src/libstrongswan/collections/array.c