Detect overflow in size calculations in __cxa_vec_new{2,3}
authorFlorian Weimer <fweimer@redhat.com>
Mon, 5 Nov 2012 17:48:46 +0000 (18:48 +0100)
committerFlorian Weimer <fw@gcc.gnu.org>
Mon, 5 Nov 2012 17:48:46 +0000 (18:48 +0100)
commit6d0ae0359c02628fa469d393739d564a630874b1
tree9a13f9e7ac82123b90ffc03ec641ccc88a9e23ce
parent0be1a5898f27445828da307df1c8cd62c800be03
Detect overflow in size calculations in __cxa_vec_new{2,3}

2012-11-03  Florian Weimer  <fweimer@redhat.com>

* libsupc++/vec.cc (compute_size): New.
(__cxa_vec_new2, __cxa_vec_new3): Use it.
* testsuite/18_support/cxa_vec.cc: New.

From-SVN: r193174
libstdc++-v3/ChangeLog
libstdc++-v3/libsupc++/vec.cc
libstdc++-v3/testsuite/18_support/cxa_vec.cc [new file with mode: 0644]