#fixed code
                                @Override
    protected void parse(NulsByteBuffer byteBuffer) throws NulsException {
        this.setHeader(byteBuffer.readNulsData(new EventHeader()));
//        version = new NulsVersion(byteBuffer.readShort());
        bestBlockHeight = byteBuffer.readVarInt();
        bestBlockHash = byteBuffer.readString();
        nulsVersion = byteBuffer.readString();
    }
#vulnerable code 
                                @Override
    protected void parse(NulsByteBuffer byteBuffer) throws NulsException {
        this.setHeader(byteBuffer.readNulsData(new EventHeader()));
//        version = new NulsVersion(byteBuffer.readShort());
        bestBlockHeight = byteBuffer.readVarInt();
        bestBlockHash = new String(byteBuffer.readByLengthByte());
        nulsVersion = new String(byteBuffer.readByLengthByte());
    } 
                            #location 6 
                            #vulnerability type NULL_DEREFERENCE