~ubuntu-branches/ubuntu/saucy/libjpeg-turbo/saucy-security

« back to all changes in this revision

Viewing changes to jdatasrc-tj.c

  • Committer: Package Import Robot
  • Author(s): Fathi Boudra
  • Date: 2013-07-28 16:52:51 UTC
  • mfrom: (1.1.3) (9.1.1 saucy-proposed)
  • Revision ID: package-import@ubuntu.com-20130728165251-7vg6wszhm941kdej
Tags: 1.3.0-0ubuntu1
* New upstream release.
  - drop debian/patches/branch-updates.diff
  - refresh tjunittest.patch (now renamed to install-tjunittest.patch)
* Update debian/control:
  - add myself to Uploaders.
* Update debian/copyright:
  - add RSA Data Security copyright (md5).
* Update debian/libturbojpeg.install:
  - install libturbojpeg.so.0* (needed by tjunittest and tjbench).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * jdatasrc.c
 
2
 * jdatasrc-tj.c
3
3
 *
 
4
 * This file was part of the Independent JPEG Group's software:
4
5
 * Copyright (C) 1994-1996, Thomas G. Lane.
5
 
 * Modified 2009-2010 by Guido Vollbeding.
6
 
 * This file is part of the Independent JPEG Group's software.
 
6
 * Modified 2009-2011 by Guido Vollbeding.
 
7
 * Modifications:
 
8
 * Copyright (C) 2011, D. R. Commander.
7
9
 * For conditions of distribution and use, see the accompanying README file.
8
10
 *
9
11
 * This file contains decompression data source routines for the case of
69
71
METHODDEF(boolean)
70
72
fill_mem_input_buffer (j_decompress_ptr cinfo)
71
73
{
72
 
  static JOCTET mybuffer[4];
 
74
  static const JOCTET mybuffer[4] = {
 
75
    (JOCTET) 0xFF, (JOCTET) JPEG_EOI, 0, 0
 
76
  };
73
77
 
74
78
  /* The whole JPEG data is expected to reside in the supplied memory
75
79
   * buffer, so any request for more data beyond the given buffer size
76
80
   * is treated as an error.
77
81
   */
78
82
  WARNMS(cinfo, JWRN_JPEG_EOF);
 
83
 
79
84
  /* Insert a fake EOI marker */
80
 
  mybuffer[0] = (JOCTET) 0xFF;
81
 
  mybuffer[1] = (JOCTET) JPEG_EOI;
82
85
 
83
86
  cinfo->src->next_input_byte = mybuffer;
84
87
  cinfo->src->bytes_in_buffer = 2;