Fix expectation that zval size was 4 bytes
Various range checks added