BVLC/caffe — pull request #1584 by longjon (2014-12-17 04:29:52+00:00)
Title: Check for overflow in Blob::Reshape

The check on `count_` is more succinct than checking the individual dimensions, and more importantly includes the previously ignored case where bad values for the dimensions cause an overflow for `count_`, resulting in a silent failure to allocate. Printing the dimension values ensures that no useful debugging information is lost in the change.