~ubuntu-branches/ubuntu/trusty/mariadb-5.5/trusty-proposed

« back to all changes in this revision

Viewing changes to storage/tokudb/ft-index/third_party/xz-4.999.9beta/src/liblzma/common/block_encoder.h

  • Committer: Package Import Robot
  • Author(s): James Page, Otto Kekäläinen
  • Date: 2014-02-17 16:51:52 UTC
  • mfrom: (2.1.1 sid)
  • Revision ID: package-import@ubuntu.com-20140217165152-k315d3175g865kkx
Tags: 5.5.35-1
[ Otto Kekäläinen ]
* New upstream release, fixing the following security issues:
  - Buffer overflow in client/mysql.cc (Closes: #737597).
    - CVE-2014-0001
  - http://www.oracle.com/technetwork/topics/security/cpujan2014-1972949.html
    - CVE-2013-5891
    - CVE-2013-5908
    - CVE-2014-0386
    - CVE-2014-0393
    - CVE-2014-0401
    - CVE-2014-0402
    - CVE-2014-0412
    - CVE-2014-0420
    - CVE-2014-0437
* Upstream https://mariadb.atlassian.net/browse/MDEV-4902
  fixes compatibility with Bison 3.0 (Closes: #733002)
* Updated Russian debconf translation (Closes: #734426)
* Updated Japanese debconf translation (Closes: #735284)
* Updated French debconf translation (Closes: #736480)
* Renamed SONAME properly (Closes: #732967)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */
 
2
// vim: expandtab:ts=8:sw=4:softtabstop=4:
 
3
///////////////////////////////////////////////////////////////////////////////
 
4
//
 
5
/// \file       block_encoder.h
 
6
/// \brief      Encodes .xz Blocks
 
7
//
 
8
//  Author:     Lasse Collin
 
9
//
 
10
//  This file has been put into the public domain.
 
11
//  You can do whatever you want with this file.
 
12
//
 
13
///////////////////////////////////////////////////////////////////////////////
 
14
 
 
15
#ifndef LZMA_BLOCK_ENCODER_H
 
16
#define LZMA_BLOCK_ENCODER_H
 
17
 
 
18
#include "common.h"
 
19
 
 
20
 
 
21
/// \brief      Biggest Compressed Size value that the Block encoder supports
 
22
///
 
23
/// The maximum size of a single Block is limited by the maximum size of
 
24
/// a Stream, which in theory is 2^63 - 3 bytes (i.e. LZMA_VLI_MAX - 3).
 
25
/// While the size is really big and no one should hit it in practice, we
 
26
/// take it into account in some places anyway to catch some errors e.g. if
 
27
/// application passes insanely big value to some function.
 
28
///
 
29
/// We could take into account the headers etc. to determine the exact
 
30
/// maximum size of the Compressed Data field, but the complexity would give
 
31
/// us nothing useful. Instead, limit the size of Compressed Data so that
 
32
/// even with biggest possible Block Header and Check fields the total
 
33
/// encoded size of the Block stays as a valid VLI. This doesn't guarantee
 
34
/// that the size of the Stream doesn't grow too big, but that problem is
 
35
/// taken care outside the Block handling code.
 
36
///
 
37
/// ~LZMA_VLI_C(3) is to guarantee that if we need padding at the end of
 
38
/// the Compressed Data field, it will still stay in the proper limit.
 
39
///
 
40
/// This constant is in this file because it is needed in both
 
41
/// block_encoder.c and block_buffer_encoder.c.
 
42
#define COMPRESSED_SIZE_MAX ((LZMA_VLI_MAX - LZMA_BLOCK_HEADER_SIZE_MAX \
 
43
                - LZMA_CHECK_SIZE_MAX) & ~LZMA_VLI_C(3))
 
44
 
 
45
 
 
46
extern lzma_ret lzma_block_encoder_init(lzma_next_coder *next,
 
47
                lzma_allocator *allocator, lzma_block *block);
 
48
 
 
49
#endif