Check size is within bounds in AllocAt().
Merge pull request #3740 from unknownbrackets/block-alloc

Check size is within bounds in AllocAt()