array: Number of items in get_size() is unsigned
authorTobias Brunner <tobias@strongswan.org>
Wed, 24 Jul 2013 14:03:38 +0000 (16:03 +0200)
committerTobias Brunner <tobias@strongswan.org>
Thu, 25 Jul 2013 09:28:01 +0000 (11:28 +0200)
commit116363e5c639be5e35483ad72ac275e5cfaee4eb
treea3d39d9051a9536da665667ae4b1a4560cca2bbc
parentd7dc4fedd11154322b92eb41b2dd53f5a97d93ad
array: Number of items in get_size() is unsigned

Otherwise, array->esize is promoted to int and if array->esize * num
results in a value > 0x7fffffff the return value would be incorrect due
the implicit sign extension when getting cast to size_t.
src/libstrongswan/collections/array.c