~ubuntu-branches/ubuntu/vivid/tiff/vivid-proposed

« back to all changes in this revision

Viewing changes to tools/tiff2bw.c

  • Committer: Package Import Robot
  • Author(s): Michael Gilbert
  • Date: 2013-06-17 01:27:17 UTC
  • Revision ID: package-import@ubuntu.com-20130617012717-s4yksbuv0ri97x5g
Tags: 4.0.2-6+nmu1
* Non-maintainer upload by the Security Team.
* Fix cve-2013-1960: heap-based buffer overlow in tiff2pdf
  (closes: #706675).
* Fix cve-2013-1961: stack-based buffer overflow in tiff2pdf
  (closes: #706674). 

Show diffs side-by-side

added added

removed removed

Lines of Context:
205
205
                }
206
206
        }
207
207
        TIFFSetField(out, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISBLACK);
208
 
        sprintf(thing, "B&W version of %s", argv[optind]);
 
208
        snprintf(thing, sizeof(thing), "B&W version of %s", argv[optind]);
209
209
        TIFFSetField(out, TIFFTAG_IMAGEDESCRIPTION, thing);
210
210
        TIFFSetField(out, TIFFTAG_SOFTWARE, "tiff2bw");
211
211
        outbuf = (unsigned char *)_TIFFmalloc(TIFFScanlineSize(out));