mirror of
				https://github.com/xerial/snappy-java.git
				synced 2025-10-31 19:45:34 +01:00 
			
		
		
		
	Merge pull request #35 from mebigfatguy/develop
make sure magic bytes are read fully
This commit is contained in:
		
						commit
						8fce6db8af
					
				| @ -91,7 +91,7 @@ public class SnappyCodec | ||||
|     public static SnappyCodec readHeader(InputStream in) throws IOException { | ||||
|         DataInputStream d = new DataInputStream(in); | ||||
|         byte[] magic = new byte[MAGIC_LEN]; | ||||
|         d.read(magic, 0, MAGIC_LEN); | ||||
|         d.readFully(magic, 0, MAGIC_LEN); | ||||
|         int version = d.readInt(); | ||||
|         int compatibleVersion = d.readInt(); | ||||
|         return new SnappyCodec(magic, version, compatibleVersion); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user