~ubuntu-branches/ubuntu/natty/tiff/natty

« back to all changes in this revision

Viewing changes to libtiff/tif_read.c

  • Committer: Bazaar Package Importer
  • Author(s): Jay Berkenbilt
  • Date: 2010-06-18 21:28:11 UTC
  • mfrom: (10.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20100618212811-3t5mffcr8gpfpuel
Tags: 3.9.4-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: tif_read.c,v 1.16 2007/02/22 11:33:44 dron Exp $ */
 
1
/* $Id: tif_read.c,v 1.16.2.3 2010-06-09 14:32:47 bfriesen Exp $ */
2
2
 
3
3
/*
4
4
 * Copyright (c) 1988-1997 Sam Leffler
600
600
                        _TIFFfree(tif->tif_rawdata);
601
601
                tif->tif_rawdata = NULL;
602
602
        }
 
603
 
603
604
        if (bp) {
604
605
                tif->tif_rawdatasize = size;
605
606
                tif->tif_rawdata = (tidata_t) bp;
606
607
                tif->tif_flags &= ~TIFF_MYBUFFER;
607
608
        } else {
608
609
                tif->tif_rawdatasize = TIFFroundup(size, 1024);
609
 
                tif->tif_rawdata = (tidata_t) _TIFFmalloc(tif->tif_rawdatasize);
 
610
                if (tif->tif_rawdatasize > 0)
 
611
                        tif->tif_rawdata = (tidata_t) _TIFFmalloc(tif->tif_rawdatasize);
610
612
                tif->tif_flags |= TIFF_MYBUFFER;
611
613
        }
612
614
        if ((tif->tif_rawdata == NULL) || (tif->tif_rawdatasize == 0)) {
739
741
}
740
742
 
741
743
/* vim: set ts=8 sts=8 sw=8 noet: */
 
744
/*
 
745
 * Local Variables:
 
746
 * mode: c
 
747
 * c-basic-offset: 8
 
748
 * fill-column: 78
 
749
 * End:
 
750
 */