driver/base/memory.c: validate memory block size early