~ubuntu-branches/ubuntu/precise/tiff/precise-security

« back to all changes in this revision

Viewing changes to libtiff/tif_dir.c

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2015-03-30 08:11:18 UTC
  • Revision ID: package-import@ubuntu.com-20150330081118-bvaoaii1act27voq
Tags: 3.9.5-2ubuntu1.7
* SECURITY UPDATE: Fix multiple security issues
  - debian/patches/CVE-2014-81xx-1.patch to CVE-2014-81xx-11.patch
  - debian/patches/CVE-2014-8128-5.patch
  - debian/patches/CVE-2014-9655-1.patch to CVE-2014-9655-3.patch
  - debian/patches/read_overrun.patch
  - debian/patches/CVE-2014-8130.patch
  - CVE-2014-8127 (partially)
  - CVE-2014-8128
  - CVE-2014-8129
  - CVE-2014-8130
  - CVE-2014-9330
  - CVE-2014-9655

Show diffs side-by-side

added added

removed removed

Lines of Context:
141
141
        TIFFDirectory* td = &tif->tif_dir;
142
142
        int status = 1;
143
143
        uint32 v32, i, v;
 
144
    double dblval;
144
145
        char* s;
145
146
 
146
147
        switch (tag) {
247
248
                td->td_smaxsamplevalue = va_arg(ap, double);
248
249
                break;
249
250
        case TIFFTAG_XRESOLUTION:
250
 
                td->td_xresolution = (float) va_arg(ap, double);
 
251
        dblval = va_arg(ap, double);
 
252
        if( dblval < 0 )
 
253
            goto badvaluedouble;
 
254
                td->td_xresolution = (float) dblval;
251
255
                break;
252
256
        case TIFFTAG_YRESOLUTION:
253
 
                td->td_yresolution = (float) va_arg(ap, double);
 
257
        dblval = va_arg(ap, double);
 
258
        if( dblval < 0 )
 
259
            goto badvaluedouble;
 
260
                td->td_yresolution = (float) dblval;
254
261
                break;
255
262
        case TIFFTAG_PLANARCONFIG:
256
263
                v = va_arg(ap, uint32);
600
607
                     _TIFFFieldWithTag(tif, tag)->field_name);
601
608
        va_end(ap);
602
609
        return (0);
 
610
badvaluedouble:
 
611
        {
 
612
        const TIFFFieldInfo* fip=TIFFFieldWithTag(tif,tag);
 
613
        TIFFErrorExt(tif->tif_clientdata, module,
 
614
             "%s: Bad value %f for \"%s\" tag",
 
615
             tif->tif_name, dblval,
 
616
             fip ? fip->field_name : "Unknown");
 
617
        va_end(ap);
 
618
        }
 
619
    return (0);
603
620
}
604
621
 
605
622
/*