*** empty log message ***
This commit is contained in:
parent
ebae7b75f6
commit
2a85ad222c
@ -1,4 +1,4 @@
|
|||||||
/* $Id: tif_strip.c,v 1.11 2004-10-01 14:11:01 dron Exp $ */
|
/* $Id: tif_strip.c,v 1.12 2004-10-02 11:16:27 dron Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1991-1997 Sam Leffler
|
* Copyright (c) 1991-1997 Sam Leffler
|
||||||
@ -34,7 +34,11 @@
|
|||||||
static uint32
|
static uint32
|
||||||
summarize(TIFF* tif, size_t summand1, size_t summand2, const char* where)
|
summarize(TIFF* tif, size_t summand1, size_t summand2, const char* where)
|
||||||
{
|
{
|
||||||
size_t bytes = summand1 + summand2;
|
/*
|
||||||
|
* XXX: We are using casting to uint32 here, bacause sizeof(size_t)
|
||||||
|
* may be larger than sizeof(uint32) on 64-bit architectures.
|
||||||
|
*/
|
||||||
|
uint32 bytes = summand1 + summand2;
|
||||||
|
|
||||||
if (bytes - summand1 != summand2) {
|
if (bytes - summand1 != summand2) {
|
||||||
TIFFError(tif->tif_name, "Integer overflow in %s", where);
|
TIFFError(tif->tif_name, "Integer overflow in %s", where);
|
||||||
@ -47,7 +51,7 @@ summarize(TIFF* tif, size_t summand1, size_t summand2, const char* where)
|
|||||||
static uint32
|
static uint32
|
||||||
multiply(TIFF* tif, size_t nmemb, size_t elem_size, const char* where)
|
multiply(TIFF* tif, size_t nmemb, size_t elem_size, const char* where)
|
||||||
{
|
{
|
||||||
size_t bytes = nmemb * elem_size;
|
uint32 bytes = nmemb * elem_size;
|
||||||
|
|
||||||
if (elem_size && bytes / elem_size != nmemb) {
|
if (elem_size && bytes / elem_size != nmemb) {
|
||||||
TIFFError(tif->tif_name, "Integer overflow in %s", where);
|
TIFFError(tif->tif_name, "Integer overflow in %s", where);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $Id: tif_tile.c,v 1.7 2004-10-01 14:11:01 dron Exp $ */
|
/* $Id: tif_tile.c,v 1.8 2004-10-02 11:16:27 dron Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1991-1997 Sam Leffler
|
* Copyright (c) 1991-1997 Sam Leffler
|
||||||
@ -34,7 +34,11 @@
|
|||||||
static uint32
|
static uint32
|
||||||
summarize(TIFF* tif, size_t summand1, size_t summand2, const char* where)
|
summarize(TIFF* tif, size_t summand1, size_t summand2, const char* where)
|
||||||
{
|
{
|
||||||
size_t bytes = summand1 + summand2;
|
/*
|
||||||
|
* XXX: We are using casting to uint32 here, bacause sizeof(size_t)
|
||||||
|
* may be larger than sizeof(uint32) on 64-bit architectures.
|
||||||
|
*/
|
||||||
|
uint32 bytes = summand1 + summand2;
|
||||||
|
|
||||||
if (bytes - summand1 != summand2) {
|
if (bytes - summand1 != summand2) {
|
||||||
TIFFError(tif->tif_name, "Integer overflow in %s", where);
|
TIFFError(tif->tif_name, "Integer overflow in %s", where);
|
||||||
@ -47,7 +51,7 @@ summarize(TIFF* tif, size_t summand1, size_t summand2, const char* where)
|
|||||||
static uint32
|
static uint32
|
||||||
multiply(TIFF* tif, size_t nmemb, size_t elem_size, const char* where)
|
multiply(TIFF* tif, size_t nmemb, size_t elem_size, const char* where)
|
||||||
{
|
{
|
||||||
size_t bytes = nmemb * elem_size;
|
uint32 bytes = nmemb * elem_size;
|
||||||
|
|
||||||
if (elem_size && bytes / elem_size != nmemb) {
|
if (elem_size && bytes / elem_size != nmemb) {
|
||||||
TIFFError(tif->tif_name, "Integer overflow in %s", where);
|
TIFFError(tif->tif_name, "Integer overflow in %s", where);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $Id: short_tag.c,v 1.3 2004-10-01 14:16:37 dron Exp $ */
|
/* $Id: short_tag.c,v 1.4 2004-10-02 11:16:04 dron Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2004, Andrey Kiselev <dron@remotesensing.org>
|
* Copyright (c) 2004, Andrey Kiselev <dron@remotesensing.org>
|
||||||
@ -63,9 +63,9 @@ static struct SingleTags {
|
|||||||
{ TIFFTAG_MINSAMPLEVALUE, 23 },
|
{ TIFFTAG_MINSAMPLEVALUE, 23 },
|
||||||
{ TIFFTAG_MAXSAMPLEVALUE, 241 },
|
{ TIFFTAG_MAXSAMPLEVALUE, 241 },
|
||||||
{ TIFFTAG_NUMBEROFINKS, SPP },
|
{ TIFFTAG_NUMBEROFINKS, SPP },
|
||||||
{ TIFFTAG_SAMPLEFORMAT, SAMPLEFORMAT_UINT },
|
{ TIFFTAG_SAMPLEFORMAT, SAMPLEFORMAT_UINT }
|
||||||
{ TIFFTAG_IMAGEDEPTH, 1 },
|
/*{ TIFFTAG_IMAGEDEPTH, 1 },
|
||||||
{ TIFFTAG_TILEDEPTH, 1 }
|
{ TIFFTAG_TILEDEPTH, 1 }*/
|
||||||
};
|
};
|
||||||
#define NSINGLETAGS (sizeof(short_single_tags) / sizeof(short_single_tags[0]))
|
#define NSINGLETAGS (sizeof(short_single_tags) / sizeof(short_single_tags[0]))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user