The {{calloc()}} function takes two arguments: the number of elements to allocate and the storage size of those elements. Typically, {{calloc()}} function implementations multiply these arguments together to determine how much memory to allocate. Historically, some implementations failed to check if this multiplication could result in an integer overflow \[[RUS-CERT Advisory 2002-08:02|http://cert.uni-stuttgart.de/advisories/calloc.php]\]. If the result of multiplying the number of elements to allocate and the storage size cannot be represented as a {{size_t}}, less memory is allocated than was requested. As a result, it is necessary to ensure that these arguments, when multiplied, do not result in an integer overflow. |