~ubuntu-branches/ubuntu/quantal/tiff/quantal-security

« back to all changes in this revision

Viewing changes to libtiff/tif_codec.c

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2013-05-13 10:43:48 UTC
  • Revision ID: package-import@ubuntu.com-20130513104348-dd395iiumjegwsis
Tags: 4.0.2-1ubuntu2.2
* SECURITY UPDATE: denial of service and possible code execution via heap
  overflow in tp_process_jpeg_strip().
  - debian/patches/CVE-2013-1960.patch: improve tp_process_jpeg_strip()
    logic in tools/tiff2pdf.c.
  - CVE-2013-1960
* SECURITY UPDATE: denial of service via stack overflow with malformed
  image-length and resolution.
  - debian/patches/CVE-2013-1961.patch: replace use of sprintf() with
    snprintf() in contrib/dbs/xtiff/xtiff.c, libtiff/tif_codec.c,
    libtiff/tif_dirinfo.c, tools/rgb2ycbcr.c, tools/tiff2bw.c,
    tools/tiff2pdf.c, tools/tiff2ps.c, tools/tiffcrop.c,
    tools/tiffdither.c.
  - CVE-2013-1961

Show diffs side-by-side

added added

removed removed

Lines of Context:
108
108
        const TIFFCodec* c = TIFFFindCODEC(tif->tif_dir.td_compression);
109
109
        char compression_code[20];
110
110
        
111
 
        sprintf( compression_code, "%d", tif->tif_dir.td_compression );
 
111
        snprintf(compression_code, sizeof(compression_code), "%d",
 
112
                 tif->tif_dir.td_compression );
112
113
        TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
113
114
                     "%s compression support is not configured", 
114
115
                     c ? c->name : compression_code );