Update to 7.65
From rohee@
This commit is contained in:
parent
f8b0b2b4e1
commit
93c0b25238
@ -1,14 +1,14 @@
|
||||
# $OpenBSD: Makefile,v 1.3 2005/06/18 18:14:49 sturm Exp $
|
||||
# $OpenBSD: Makefile,v 1.4 2005/09/27 08:24:22 alek Exp $
|
||||
|
||||
COMMENT= "digital camera RAW format conversion tool"
|
||||
|
||||
PKGNAME= dcraw-7.30
|
||||
PKGNAME= dcraw-7.65
|
||||
CATEGORIES= graphics
|
||||
|
||||
HOMEPAGE= http://www.cybercom.net/~dcoffin/dcraw/
|
||||
|
||||
MASTER_SITES= ${HOMEPAGE} \
|
||||
http://bruno.rohee.free.fr/dcraw/${PKGNAME}/
|
||||
MASTER_SITES= http://bruno.rohee.free.fr/dcraw/${PKGNAME}/
|
||||
|
||||
DISTFILES= dcraw.c dcraw.1
|
||||
DIST_SUBDIR= ${PKGNAME}
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
MD5 (dcraw-7.30/dcraw.1) = 820272f1b98125d473c62abe4a36cc79
|
||||
MD5 (dcraw-7.30/dcraw.c) = 77c020aaae5bc75008917999cc4ddcff
|
||||
RMD160 (dcraw-7.30/dcraw.1) = b0a0b0376c9fcbc1b996466e6c77bfffa07c25cb
|
||||
RMD160 (dcraw-7.30/dcraw.c) = 3c36b28c4da99eb6db2fa9046d3f7e29dcea36ca
|
||||
SHA1 (dcraw-7.30/dcraw.1) = 6c022b8aebc4a84b36fc59c497be54856b4ee543
|
||||
SHA1 (dcraw-7.30/dcraw.c) = 9a444ae352d82640938a0d88823e138d1b944ac1
|
||||
SIZE (dcraw-7.30/dcraw.1) = 3744
|
||||
SIZE (dcraw-7.30/dcraw.c) = 151490
|
||||
MD5 (dcraw-7.65/dcraw.1) = 45807133f764a332acf35ab56b80a2c1
|
||||
MD5 (dcraw-7.65/dcraw.c) = 3960b0b6409d9253029c3cb4228f8e2b
|
||||
RMD160 (dcraw-7.65/dcraw.1) = 7359cb9fd7db37fc169923e2fa0e7e62068361df
|
||||
RMD160 (dcraw-7.65/dcraw.c) = fc8e7b41b03e59900faa325f014e95d631241992
|
||||
SHA1 (dcraw-7.65/dcraw.1) = 29cf11aa29b60262abf89024824a6fcf1e6be50b
|
||||
SHA1 (dcraw-7.65/dcraw.c) = 0b5d2e550d0592186b901b46a6ef8af07787aa2d
|
||||
SIZE (dcraw-7.65/dcraw.1) = 3890
|
||||
SIZE (dcraw-7.65/dcraw.c) = 169712
|
||||
|
@ -1,10 +1,6 @@
|
||||
$OpenBSD: patch-dcraw_c,v 1.3 2005/06/18 18:14:49 sturm Exp $
|
||||
|
||||
Remove instances of sprintf(3), strcat(3) and strcpy(3).
|
||||
|
||||
--- dcraw.c.orig Sat Jun 18 00:00:12 2005
|
||||
+++ dcraw.c Sat Jun 18 00:01:06 2005
|
||||
@@ -1958,7 +1958,7 @@ void CLASS foveon_interpolate()
|
||||
--- dcraw.c.orig Thu Sep 15 00:17:59 2005
|
||||
+++ dcraw.c Thu Sep 15 00:18:35 2005
|
||||
@@ -2228,7 +2228,7 @@ void CLASS foveon_interpolate()
|
||||
for (j=0; j < 3; j++)
|
||||
FORC3 last[i][j] += correct[i][c] * cam_xyz[c][j];
|
||||
|
||||
@ -13,7 +9,7 @@ Remove instances of sprintf(3), strcat(3) and strcpy(3).
|
||||
if (foveon_camf_param ("IncludeBlocks", str))
|
||||
foveon_fixed (div, 3, str);
|
||||
else {
|
||||
@@ -2323,9 +2323,9 @@ void CLASS bad_pixels()
|
||||
@@ -2598,9 +2598,9 @@ void CLASS bad_pixels()
|
||||
if (*cp == '\\') *cp = '/';
|
||||
#endif
|
||||
cp = fname + strlen(fname);
|
||||
@ -25,7 +21,7 @@ Remove instances of sprintf(3), strcat(3) and strcpy(3).
|
||||
if ((fp = fopen (fname, "r"))) break;
|
||||
if (cp == fname) break;
|
||||
while (*--cp != '/');
|
||||
@@ -3065,7 +3065,7 @@ int CLASS parse_tiff_ifd (int base, int
|
||||
@@ -3530,7 +3530,7 @@ int CLASS parse_tiff_ifd (int base, int
|
||||
if (level) {
|
||||
data_offset = ftell(ifp);
|
||||
} else {
|
||||
@ -34,16 +30,16 @@ Remove instances of sprintf(3), strcat(3) and strcpy(3).
|
||||
data_offset = get4();
|
||||
}
|
||||
break;
|
||||
@@ -3181,7 +3181,7 @@ guess_cfa_pc:
|
||||
raw_height++;
|
||||
|
||||
if (make[0] == 0 && raw_width == 680)
|
||||
- strcpy (make, "Imacon");
|
||||
+ strlcpy (make, "Imacon", sizeof make);
|
||||
|
||||
return done;
|
||||
}
|
||||
@@ -3243,6 +3243,7 @@ void CLASS parse_external_jpeg()
|
||||
@@ -3565,7 +3565,7 @@ int CLASS parse_tiff_ifd (int base, int
|
||||
parse_exif (base);
|
||||
break;
|
||||
case 46275:
|
||||
- strcpy (make, "Imacon");
|
||||
+ strlcpy (make, "Imacon", sizeof make);
|
||||
data_offset = ftell(ifp);
|
||||
raw_width = 4090;
|
||||
raw_height = len / raw_width / 2;
|
||||
@@ -3716,6 +3716,7 @@ void CLASS parse_external_jpeg()
|
||||
{
|
||||
char *file, *ext, *jname, *jfile, *jext;
|
||||
FILE *save=ifp;
|
||||
@ -51,7 +47,7 @@ Remove instances of sprintf(3), strcat(3) and strcpy(3).
|
||||
|
||||
ext = strrchr (ifname, '.');
|
||||
file = strrchr (ifname, '/');
|
||||
@@ -3250,13 +3251,15 @@ void CLASS parse_external_jpeg()
|
||||
@@ -3723,13 +3724,15 @@ void CLASS parse_external_jpeg()
|
||||
if (!file) file = ifname-1;
|
||||
file++;
|
||||
if (strlen(ext) != 4 || ext-file != 8) return;
|
||||
@ -70,7 +66,7 @@ Remove instances of sprintf(3), strcat(3) and strcpy(3).
|
||||
memcpy (jfile, file+4, 4);
|
||||
memcpy (jfile+4, file, 4);
|
||||
} else
|
||||
@@ -3459,8 +3462,8 @@ void CLASS parse_rollei()
|
||||
@@ -3932,8 +3935,8 @@ void CLASS parse_rollei()
|
||||
if ((ts = mktime(&t)) > 0)
|
||||
timestamp = ts;
|
||||
data_offset += tx * ty * 2;
|
||||
@ -81,15 +77,15 @@ Remove instances of sprintf(3), strcat(3) and strcpy(3).
|
||||
}
|
||||
|
||||
void CLASS parse_mos (int offset)
|
||||
@@ -3544,14 +3547,14 @@ void CLASS parse_phase_one (int base)
|
||||
}
|
||||
fseek (ifp, save, SEEK_SET);
|
||||
@@ -4019,14 +4022,14 @@ void CLASS parse_phase_one (int base)
|
||||
}
|
||||
load_raw = tiff_data_compression < 3 ?
|
||||
phase_one_load_raw:phase_one_load_raw_c;
|
||||
- strcpy (make, "Phase One");
|
||||
+ strlcpy (make, "Phase One", sizeof make);
|
||||
if (model[0]) return;
|
||||
- sprintf (model, "%dx%d", width, height);
|
||||
+ snprintf (model, sizeof model, "%dx%d", width, height);
|
||||
+ snprintf (model, sizeof model, "%dx%d", width, height);
|
||||
switch (raw_height) {
|
||||
- case 2060: strcpy (model,"LightPhase"); break;
|
||||
- case 2682: strcpy (model,"H 10"); break;
|
||||
@ -102,27 +98,18 @@ Remove instances of sprintf(3), strcat(3) and strcpy(3).
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3590,7 +3593,7 @@ void CLASS parse_jpeg (int offset)
|
||||
parse_tiff (save+6);
|
||||
fseek (ifp, save+len, SEEK_SET);
|
||||
}
|
||||
- strcat (model," JPEG");
|
||||
+ strlcat (model," JPEG", sizeof model);
|
||||
}
|
||||
|
||||
void CLASS parse_smal (int offset, int fsize)
|
||||
@@ -3613,8 +3616,8 @@ void CLASS parse_smal (int offset, int f
|
||||
height = get2();
|
||||
width = get2();
|
||||
}
|
||||
@@ -4081,8 +4084,8 @@ void CLASS parse_smal (int offset, int f
|
||||
if (ver > 6) data_offset = get4();
|
||||
raw_height = height = get2();
|
||||
raw_width = width = get2();
|
||||
- strcpy (make, "SMaL");
|
||||
- sprintf (model, "v%d %dx%d", ver, width, height);
|
||||
+ strlcpy (make, "SMaL", sizeof make);
|
||||
+ snprintf (model, sizeof model, "v%d %dx%d", ver, width, height);
|
||||
if (ver == 6) load_raw = smal_v6_load_raw;
|
||||
if (ver == 9) load_raw = smal_v9_load_raw;
|
||||
}
|
||||
|
||||
char * CLASS foveon_gets (int offset, char *str, int len)
|
||||
@@ -3886,7 +3889,7 @@ void CLASS adobe_coeff()
|
||||
@@ -4372,7 +4375,7 @@ void CLASS adobe_coeff()
|
||||
char name[130];
|
||||
int i, j;
|
||||
|
||||
@ -131,7 +118,7 @@ Remove instances of sprintf(3), strcat(3) and strcpy(3).
|
||||
for (i=0; i < sizeof table / sizeof *table; i++)
|
||||
if (!strncmp (name, table[i].prefix, strlen(table[i].prefix))) {
|
||||
for (j=0; j < 12; j++)
|
||||
@@ -4010,14 +4013,14 @@ int CLASS identify (int will_decode)
|
||||
@@ -4525,14 +4528,14 @@ int CLASS identify (int will_decode)
|
||||
order = 0x4949;
|
||||
fseek (ifp, 38, SEEK_SET);
|
||||
if (get4() == 2834 && get4() == 2834) {
|
||||
@ -149,7 +136,7 @@ Remove instances of sprintf(3), strcat(3) and strcpy(3).
|
||||
order = 0x4949;
|
||||
fseek (ifp, 10, SEEK_SET);
|
||||
data_offset += get4();
|
||||
@@ -4029,15 +4032,15 @@ nucore:
|
||||
@@ -4544,15 +4547,15 @@ nucore:
|
||||
data_offset -= 0x1000;
|
||||
}
|
||||
} else if (!memcmp (head+25, "ARECOYK", 7)) {
|
||||
@ -169,7 +156,7 @@ Remove instances of sprintf(3), strcat(3) and strcpy(3).
|
||||
} else if (!memcmp (head, "FUJIFILM", 8)) {
|
||||
fseek (ifp, 92, SEEK_SET);
|
||||
parse_fuji (get4());
|
||||
@@ -4055,8 +4058,8 @@ nucore:
|
||||
@@ -4570,8 +4573,8 @@ nucore:
|
||||
else
|
||||
for (i=0; i < sizeof table / sizeof *table; i++)
|
||||
if (fsize == table[i].fsize) {
|
||||
@ -180,25 +167,25 @@ Remove instances of sprintf(3), strcat(3) and strcpy(3).
|
||||
if (table[i].withjpeg)
|
||||
parse_external_jpeg();
|
||||
}
|
||||
@@ -4067,7 +4070,7 @@ nucore:
|
||||
@@ -4582,7 +4585,7 @@ nucore:
|
||||
|
||||
for (i=0; i < sizeof corp / sizeof *corp; i++)
|
||||
if (strstr (make, corp[i])) /* Simplify company names */
|
||||
- strcpy (make, corp[i]);
|
||||
+ strlcpy (make, corp[i], sizeof make);
|
||||
if (!strncmp (make, "KODAK", 5))
|
||||
if (!strncmp (make,"KODAK",5))
|
||||
make[16] = model[16] = 0;
|
||||
cp = make + strlen(make); /* Remove trailing spaces */
|
||||
@@ -4098,7 +4101,7 @@ nucore:
|
||||
@@ -4608,7 +4611,7 @@ nucore:
|
||||
xmag = ymag = 1;
|
||||
}
|
||||
load_raw = NULL;
|
||||
if (is_dng) {
|
||||
if (dng_version) {
|
||||
- strcat (model," DNG");
|
||||
+ strlcat (model," DNG", sizeof model);
|
||||
if (filters == UINT_MAX) filters = 0;
|
||||
if (!filters)
|
||||
colors = tiff_samples;
|
||||
@@ -4281,7 +4284,7 @@ canon_cr2:
|
||||
@@ -4793,7 +4796,7 @@ canon_cr2:
|
||||
pre_mul[2] = 1.018;
|
||||
} else if (!strcmp(model,"E995")) {
|
||||
cp_e995:
|
||||
@ -207,7 +194,7 @@ Remove instances of sprintf(3), strcat(3) and strcpy(3).
|
||||
height = 1540;
|
||||
width = 2064;
|
||||
colors = 4;
|
||||
@@ -4295,7 +4298,7 @@ cp_e995:
|
||||
@@ -4807,7 +4810,7 @@ cp_e995:
|
||||
pre_mul[2] = 1.040;
|
||||
} else if (!strcmp(model,"E2500")) {
|
||||
cp_e2500:
|
||||
@ -216,18 +203,23 @@ Remove instances of sprintf(3), strcat(3) and strcpy(3).
|
||||
height = 1204;
|
||||
width = 1616;
|
||||
colors = 4;
|
||||
@@ -4309,8 +4312,8 @@ cp_e2500:
|
||||
@@ -4819,11 +4822,11 @@ cp_e2500:
|
||||
pre_mul[0] = 1.818;
|
||||
pre_mul[2] = 1.618;
|
||||
} else if (!strcmp(model,"Optio 33WR")) {
|
||||
optio_33wr:
|
||||
- strcpy (make, "PENTAX");
|
||||
- strcpy (model,"Optio 33WR");
|
||||
+ strlcpy (make, "PENTAX", sizeof make);
|
||||
+ strlcpy (model, "Optio 33WR", sizeof model);
|
||||
height = 1542;
|
||||
width = 2064;
|
||||
load_raw = nikon_e2100_load_raw;
|
||||
@@ -4328,8 +4331,8 @@ optio_33wr:
|
||||
if ((i = nikon_3700()) == 2) {
|
||||
- strcpy (make, "OLYMPUS");
|
||||
- strcpy (model, "C740UZ");
|
||||
+ strlcpy (make, "OLYMPUS", sizeof make);
|
||||
+ strlcpy (model, "C740UZ", sizeof model);
|
||||
} else if (i == 0) {
|
||||
- strcpy (make, "PENTAX");
|
||||
- strcpy (model,"Optio 33WR");
|
||||
+ strlcpy (make, "PENTAX", sizeof make);
|
||||
+ strlcpy (model,"Optio 33WR", sizeof model);
|
||||
flip = 1;
|
||||
filters = 0x16161616;
|
||||
pre_mul[0] = 1.331;
|
||||
@@ -4839,8 +4842,8 @@ cp_e2500:
|
||||
pre_mul[2] = 322;
|
||||
} else if (!strcmp(model,"DiMAGE Z2")) {
|
||||
dimage_z2:
|
||||
@ -238,7 +230,7 @@ Remove instances of sprintf(3), strcat(3) and strcpy(3).
|
||||
height = 1710;
|
||||
width = 2288;
|
||||
filters = 0x16161616;
|
||||
@@ -4355,7 +4358,7 @@ dimage_z2:
|
||||
@@ -4866,7 +4869,7 @@ dimage_z2:
|
||||
filters = 0x61616161;
|
||||
load_raw = fuji_s2_load_raw;
|
||||
black = 128;
|
||||
@ -247,18 +239,37 @@ Remove instances of sprintf(3), strcat(3) and strcpy(3).
|
||||
} else if (!strcmp(model,"FinePix S3Pro")) {
|
||||
height = 3583;
|
||||
width = 3584;
|
||||
@@ -4516,7 +4519,7 @@ konica_400z:
|
||||
data_offset -= 10;
|
||||
flip = 3;
|
||||
@@ -4938,7 +4941,7 @@ dimage_z2:
|
||||
} else if (!strncmp(model,"ALPHA",5) ||
|
||||
!strncmp(model,"DYNAX",5) ||
|
||||
!strncmp(model,"MAXXUM",6)) {
|
||||
- sprintf (model, "DYNAX%s", strchr (model,' '));
|
||||
+ snprintf (model, sizeof model, "DYNAX%s", strchr (model,' '));
|
||||
load_raw = packed_12_load_raw;
|
||||
maximum = 0xffb;
|
||||
} else if (!strncmp(model,"DiMAGE G",8)) {
|
||||
@@ -5051,15 +5054,15 @@ konica_400z:
|
||||
height -= 16;
|
||||
width -= 28;
|
||||
maximum = 0xf5c0;
|
||||
- strcpy (make, "ISG");
|
||||
- sprintf (model, "%dx%d", width, height);
|
||||
+ strlcpy (make, "ISG", sizeof make);
|
||||
+ snprintf (model, sizeof model, "%dx%d", width, height);
|
||||
}
|
||||
} else if (!strcmp(make,"Imacon")) {
|
||||
height = raw_height - 6;
|
||||
width = raw_width - 10;
|
||||
data_offset += 6 + raw_width*12;
|
||||
flip = height > width+10 ? 5:3;
|
||||
- sprintf (model, "Ixpress %d-Mp", height*width/1000000);
|
||||
+ snprintf (model, sizeof model, "Ixpress %d-Mp", height*width/1000000);
|
||||
filters = 0x61616161;
|
||||
load_raw = unpacked_load_raw;
|
||||
maximum = 0xffff;
|
||||
@@ -4533,11 +4536,11 @@ konica_400z:
|
||||
} else if (!strcmp(make,"Leaf")) {
|
||||
load_raw = unpacked_load_raw;
|
||||
@@ -5078,11 +5081,11 @@ konica_400z:
|
||||
if (tiff_data_compression == 99)
|
||||
load_raw = lossless_jpeg_load_raw;
|
||||
maximum = 0x3fff;
|
||||
- strcpy (model, "Valeo");
|
||||
+ strlcpy (model, "Valeo", sizeof model);
|
||||
@ -268,9 +279,9 @@ Remove instances of sprintf(3), strcat(3) and strcpy(3).
|
||||
- strcpy (model, "Volare");
|
||||
+ strlcpy (model, "Volare", sizeof model);
|
||||
}
|
||||
} else if (!strcmp(model,"DIGILUX 2") || !strcmp(model,"DMC-LC1")) {
|
||||
height = 1928;
|
||||
@@ -4662,7 +4665,7 @@ konica_400z:
|
||||
} else if (!strcmp(make,"LEICA") || !strcmp(make,"Panasonic")) {
|
||||
if (width == 3304) width -= 16;
|
||||
@@ -5219,7 +5222,7 @@ konica_400z:
|
||||
return 1;
|
||||
}
|
||||
if (strstr(model,"DC25")) {
|
||||
@ -279,7 +290,7 @@ Remove instances of sprintf(3), strcat(3) and strcpy(3).
|
||||
data_offset = 15424;
|
||||
}
|
||||
if (!strncmp(model,"DC2",3)) {
|
||||
@@ -4681,19 +4684,19 @@ konica_400z:
|
||||
@@ -5238,19 +5241,19 @@ konica_400z:
|
||||
pre_mul[3] = 1.036;
|
||||
load_raw = kodak_easy_load_raw;
|
||||
} else if (!strcmp(model,"Digital Camera 40")) {
|
||||
@ -302,7 +313,7 @@ Remove instances of sprintf(3), strcat(3) and strcpy(3).
|
||||
height = 976;
|
||||
width = 848;
|
||||
if (tiff_data_compression == 7)
|
||||
@@ -5112,6 +5115,7 @@ int CLASS main (int argc, char **argv)
|
||||
@@ -5672,6 +5675,7 @@ int CLASS main (int argc, char **argv)
|
||||
struct utimbuf ut;
|
||||
const char *write_ext = ".ppm";
|
||||
FILE *ofp = stdout;
|
||||
@ -310,9 +321,9 @@ Remove instances of sprintf(3), strcat(3) and strcpy(3).
|
||||
#ifdef USE_LCMS
|
||||
char *profile = NULL;
|
||||
#endif
|
||||
@@ -5294,14 +5298,15 @@ next:
|
||||
flip_image();
|
||||
}
|
||||
@@ -5844,14 +5848,15 @@ next:
|
||||
convert_to_rgb();
|
||||
if (flip) flip_image();
|
||||
fclose(ifp);
|
||||
- ofname = malloc (strlen(ifname) + 16);
|
||||
+ ofsize = strlen(ifname) + 16;
|
||||
|
Loading…
Reference in New Issue
Block a user