Exploit databaseDownload repository ZIP
GH-fdeb092e87df8e0c829cabb4c07ed760
shanika04/apache_kylin
Sources for CVE-2020-1937
1 sourcePreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.
Repository files15
shanika04/apache_kylinRevision d5683f2d25ba
- ↑..Parent directory
- BigDecimalSerializer.java
- BooleanSerializer.java
- DataType.java
- DataTypeOrder.java
- DataTypeSerializer.java
- DateTimeSerializer.java
- DoubleMutable.java
- DoubleSerializer.java
- DynamicDimSerializer.java
- Int4Serializer.java
- IntMutable.java
- Long8Serializer.java
- LongMutable.java
- LongSerializer.java
- StringSerializer.java
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
core-metadata/src/main/java/org/apache/kylin/metadata/datatype/LongSerializer.java
Java · 1,787 bytes/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.kylin.metadata.datatype;
import java.nio.ByteBuffer;
import org.apache.kylin.common.util.BytesUtil;
/**
*/
@SuppressWarnings("serial")
public class LongSerializer extends DataTypeSerializer<Long> {
public LongSerializer(DataType type) {
}
@Override
public void serialize(Long value, ByteBuffer out) {
BytesUtil.writeVLong(value, out);
}
@Override
public Long deserialize(ByteBuffer in) {
return BytesUtil.readVLong(in);
}
@Override
public int peekLength(ByteBuffer in) {
int mark = in.position();
BytesUtil.readVLong(in);
int len = in.position() - mark;
in.position(mark);
return len;
}
@Override
public int maxLength() {
return 9; // vlong: 1 + 8
}
@Override
public int getStorageBytesEstimate() {
return 5;
}
@Override
public Long valueOf(String str) {
return Long.parseLong(str);
}
}