[subset] fix for fuzzer testcase: https://oss-fuzz.com/testcase-detail/6382598554255360 avoid writing to null pointer