summaryrefslogtreecommitdiff
path: root/graphics/lcms/patches
diff options
context:
space:
mode:
authordrochner <drochner>2013-08-07 16:46:23 +0000
committerdrochner <drochner>2013-08-07 16:46:23 +0000
commit0e626307df02bb7bcce6dce24c3a82fb31b47ca0 (patch)
treed8c3c866d93d920300a7ba42a3b0ac4e68251ba2 /graphics/lcms/patches
parent0a30aec3aa581fd246ce5788dda982663569c0f5 (diff)
downloadpkgsrc-0e626307df02bb7bcce6dce24c3a82fb31b47ca0.tar.gz
fix possible buffer overflows in cmd line tools found by Pedro Ribeiro
(see Debian bug #718682) bump PKGREV
Diffstat (limited to 'graphics/lcms/patches')
-rw-r--r--graphics/lcms/patches/patch-aa24
-rw-r--r--graphics/lcms/patches/patch-ab15
2 files changed, 39 insertions, 0 deletions
diff --git a/graphics/lcms/patches/patch-aa b/graphics/lcms/patches/patch-aa
new file mode 100644
index 00000000000..87937f7a761
--- /dev/null
+++ b/graphics/lcms/patches/patch-aa
@@ -0,0 +1,24 @@
+$NetBSD: patch-aa,v 1.13 2013/08/07 16:46:23 drochner Exp $
+
+buffer overflows
+
+--- samples/icctrans.c.orig 2009-10-30 15:57:45.000000000 +0000
++++ samples/icctrans.c
+@@ -500,7 +500,7 @@ void PrintRange(const char* C, double v,
+
+ Prefix[0] = 0;
+ if (!lTerse)
+- sprintf(Prefix, "%s=", C);
++ snprintf(Prefix, sizeof(Prefix), "%s=", C);
+
+ if (InHexa)
+ {
+@@ -648,7 +648,7 @@ void PrintResults(WORD Encoded[], icColo
+ static
+ void GetLine(char* Buffer)
+ {
+- scanf("%s", Buffer);
++ scanf("%4095s", Buffer);
+
+ if (toupper(Buffer[0]) == 'Q') { // Quit?
+
diff --git a/graphics/lcms/patches/patch-ab b/graphics/lcms/patches/patch-ab
new file mode 100644
index 00000000000..91aed4f45b4
--- /dev/null
+++ b/graphics/lcms/patches/patch-ab
@@ -0,0 +1,15 @@
+$NetBSD: patch-ab,v 1.12 2013/08/07 16:46:23 drochner Exp $
+
+buffer overflow
+
+--- tifficc/tiffdiff.c.orig 2009-10-30 15:57:46.000000000 +0000
++++ tifficc/tiffdiff.c
+@@ -633,7 +633,7 @@ void CreateCGATS(const char* TiffName1,
+ cmsIT8SetSheetType(hIT8, "TIFFDIFF");
+
+
+- sprintf(Buffer, "Differences between %s and %s", TiffName1, TiffName2);
++ snprintf(Buffer, sizeof(Buffer), "Differences between %s and %s", TiffName1, TiffName2);
+
+ cmsIT8SetComment(hIT8, Buffer);
+