block_header_encoder.c   block_header_encoder.c 
skipping to change at line 19 skipping to change at line 19
// You can do whatever you want with this file. // You can do whatever you want with this file.
// //
/////////////////////////////////////////////////////////////////////////// //// /////////////////////////////////////////////////////////////////////////// ////
#include "common.h" #include "common.h"
#include "check.h" #include "check.h"
extern LZMA_API(lzma_ret) extern LZMA_API(lzma_ret)
lzma_block_header_size(lzma_block *block) lzma_block_header_size(lzma_block *block)
{ {
if (block->version != 0) if (block->version > 1)
return LZMA_OPTIONS_ERROR; return LZMA_OPTIONS_ERROR;
// Block Header Size + Block Flags + CRC32. // Block Header Size + Block Flags + CRC32.
uint32_t size = 1 + 1 + 4; uint32_t size = 1 + 1 + 4;
// Compressed Size // Compressed Size
if (block->compressed_size != LZMA_VLI_UNKNOWN) { if (block->compressed_size != LZMA_VLI_UNKNOWN) {
const uint32_t add = lzma_vli_size(block->compressed_size); const uint32_t add = lzma_vli_size(block->compressed_size);
if (add == 0 || block->compressed_size == 0) if (add == 0 || block->compressed_size == 0)
return LZMA_PROG_ERROR; return LZMA_PROG_ERROR;
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/