Author: malat Date: 2013-05-28 13:16:24 +0000 (Tue, 28 May 2013) New Revision: 13731
Added: trunk/packages/dcmtk/trunk/debian/libdcmtk-data.dirs trunk/packages/dcmtk/trunk/debian/libdcmtk-data.install trunk/packages/dcmtk/trunk/debian/patches/fixnull.patch trunk/packages/dcmtk/trunk/debian/patches/noleak.patch trunk/packages/dcmtk/trunk/debian/patches/nothrow.patch Modified: trunk/packages/dcmtk/trunk/debian/changelog trunk/packages/dcmtk/trunk/debian/control trunk/packages/dcmtk/trunk/debian/libdcmtk2.dirs trunk/packages/dcmtk/trunk/debian/patches/series trunk/packages/dcmtk/trunk/debian/rules Log: Prepare dcmtk upload Modified: trunk/packages/dcmtk/trunk/debian/changelog =================================================================== --- trunk/packages/dcmtk/trunk/debian/changelog 2013-05-28 11:54:58 UTC (rev 13730) +++ trunk/packages/dcmtk/trunk/debian/changelog 2013-05-28 13:16:24 UTC (rev 13731) @@ -1,3 +1,13 @@ +dcmtk (3.6.0-14) unstable; urgency=low + + * Provide a libdcmtk-data, as per policy, section ยง8.2. Closes: #709123 + * Import patches from upstream: + + d/p/fixnull.patch + + d/p/noleak.patch + + d/p/nothrow.patch + + -- Mathieu Malaterre <[email protected]> Tue, 28 May 2013 15:14:58 +0200 + dcmtk (3.6.0-13) unstable; urgency=low * Remove d/README.source, since source-format 3.0 Modified: trunk/packages/dcmtk/trunk/debian/control =================================================================== --- trunk/packages/dcmtk/trunk/debian/control 2013-05-28 11:54:58 UTC (rev 13730) +++ trunk/packages/dcmtk/trunk/debian/control 2013-05-28 13:16:24 UTC (rev 13731) @@ -25,10 +25,23 @@ . Note: This version was compiled with libssl support. +Package: libdcmtk-data +Architecture: all +Depends: ${misc:Depends} +Replaces: libdcmtk2 (<= 3.6.0-13) +Breaks: libdcmtk2 (<= 3.6.0-13) +Description: OFFIS DICOM toolkit data dictionaries + DCMTK includes a collection of libraries and applications for examining, + constructing and converting DICOM image files, handling offline media, + sending and receiving images over a network connection, as well as + demonstrative image storage and worklist servers. + . + This package contains the data dictionares for DCMTK. + Package: libdcmtk2 Section: libs Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends} +Depends: ${shlibs:Depends}, ${misc:Depends}, libdcmtk-data (= ${source:Version}) Conflicts: dcmtk (<< 3.6.0) Description: OFFIS DICOM toolkit runtime libraries DCMTK includes a collection of libraries and applications for examining, Added: trunk/packages/dcmtk/trunk/debian/libdcmtk-data.dirs =================================================================== --- trunk/packages/dcmtk/trunk/debian/libdcmtk-data.dirs (rev 0) +++ trunk/packages/dcmtk/trunk/debian/libdcmtk-data.dirs 2013-05-28 13:16:24 UTC (rev 13731) @@ -0,0 +1 @@ +usr/share/dcmtk Added: trunk/packages/dcmtk/trunk/debian/libdcmtk-data.install =================================================================== --- trunk/packages/dcmtk/trunk/debian/libdcmtk-data.install (rev 0) +++ trunk/packages/dcmtk/trunk/debian/libdcmtk-data.install 2013-05-28 13:16:24 UTC (rev 13731) @@ -0,0 +1 @@ +dcmdata/data/*.dic usr/share/dcmtk Modified: trunk/packages/dcmtk/trunk/debian/libdcmtk2.dirs =================================================================== --- trunk/packages/dcmtk/trunk/debian/libdcmtk2.dirs 2013-05-28 11:54:58 UTC (rev 13730) +++ trunk/packages/dcmtk/trunk/debian/libdcmtk2.dirs 2013-05-28 13:16:24 UTC (rev 13731) @@ -1,2 +1 @@ usr/lib -usr/share/dcmtk Added: trunk/packages/dcmtk/trunk/debian/patches/fixnull.patch =================================================================== --- trunk/packages/dcmtk/trunk/debian/patches/fixnull.patch (rev 0) +++ trunk/packages/dcmtk/trunk/debian/patches/fixnull.patch 2013-05-28 13:16:24 UTC (rev 13731) @@ -0,0 +1,36 @@ +From 9fc7bd358d1791a14afdd14c81ce9266b7e12b8a Mon Sep 17 00:00:00 2001 +From: Michael Onken <[email protected]> +Date: Mon, 27 May 2013 14:52:57 +0200 +Subject: [PATCH] Make sure memcpy does not copy to NULL destination. Thanks to Francesco Gigante + for the report. + +--- + CHANGES.361 | 6 ++++++ + dcmdata/libsrc/dcelem.cc | 7 ++++--- + 2 files changed, 10 insertions(+), 3 deletions(-) + +Index: dcmtk-3.6.0/dcmdata/libsrc/dcelem.cc +=================================================================== +--- dcmtk-3.6.0.orig/dcmdata/libsrc/dcelem.cc 2010-11-05 10:34:14.000000000 +0100 ++++ dcmtk-3.6.0/dcmdata/libsrc/dcelem.cc 2013-05-28 14:11:47.534895101 +0200 +@@ -112,7 +112,8 @@ + if (pad && fValue) + fValue[getLengthField()] = 0; + +- memcpy(fValue, elem.fValue, size_t(getLengthField() + pad)); ++ if (fValue) ++ memcpy(fValue, elem.fValue, size_t(getLengthField() + pad)); + } + + if (elem.fLoadValue) +@@ -179,8 +180,8 @@ + + if (pad && fValue) + fValue[getLengthField()] = 0; +- +- memcpy(fValue, obj.fValue, size_t(getLengthField()+pad)); ++ if (fValue) ++ memcpy(fValue, obj.fValue, size_t(getLengthField()+pad)); + } + + if (obj.fLoadValue) Added: trunk/packages/dcmtk/trunk/debian/patches/noleak.patch =================================================================== --- trunk/packages/dcmtk/trunk/debian/patches/noleak.patch (rev 0) +++ trunk/packages/dcmtk/trunk/debian/patches/noleak.patch 2013-05-28 13:16:24 UTC (rev 13731) @@ -0,0 +1,36 @@ +From 904d810a9d62ab0e1e0aac857371b936f0b70289 Mon Sep 17 00:00:00 2001 +From: Joerg Riesmeier <[email protected]> +Date: Fri, 5 Apr 2013 12:32:52 +0200 +Subject: [PATCH] Fixed two possible memory leaks. + +These leaks were found by static code analysis, e.g. using cppcheck. +--- + CHANGES.361 | 4 ++++ + dcmnet/libsrc/assoc.cc | 14 +++++++++++--- + 2 files changed, 15 insertions(+), 3 deletions(-) + +Index: dcmtk-3.6.0/dcmnet/libsrc/assoc.cc +=================================================================== +--- dcmtk-3.6.0.orig/dcmnet/libsrc/assoc.cc 2010-12-01 09:26:35.000000000 +0100 ++++ dcmtk-3.6.0/dcmnet/libsrc/assoc.cc 2013-05-28 14:47:09.770871207 +0200 +@@ -1740,10 +1740,18 @@ + if (cond.bad()) return cond; + + cond = ASC_setTransportLayerType(params, useSecureLayer); +- if (cond.bad()) return cond; ++ if (cond.bad()) ++ { ++ ASC_destroyAssociationParameters(¶ms); ++ return cond; ++ } + + *assoc = (T_ASC_Association *) malloc(sizeof(**assoc)); +- if (*assoc == NULL) return EC_MemoryExhausted; ++ if (*assoc == NULL) ++ { ++ ASC_destroyAssociationParameters(¶ms); ++ return EC_MemoryExhausted; ++ } + bzero((char*)*assoc, sizeof(**assoc)); + + (*assoc)->params = params; Added: trunk/packages/dcmtk/trunk/debian/patches/nothrow.patch =================================================================== --- trunk/packages/dcmtk/trunk/debian/patches/nothrow.patch (rev 0) +++ trunk/packages/dcmtk/trunk/debian/patches/nothrow.patch 2013-05-28 13:16:24 UTC (rev 13731) @@ -0,0 +1,76 @@ +From 873af0c229b92e5ceba62e5a3f78180a18b395d4 Mon Sep 17 00:00:00 2001 +From: Joerg Riesmeier <[email protected]> +Date: Fri, 5 Apr 2013 11:40:36 +0200 +Subject: [PATCH] Use non-throwing new and delete operator. + +Use a non-throwing new and delete operator for large memory buffers +(e.g. pixel data) in order to avoid exceptions. +--- + CHANGES.361 | 7 +++++++ + dcmimgle/include/dcmtk/dcmimgle/diinpxt.h | 26 +++++++++++++++++++++++--- + 2 files changed, 30 insertions(+), 3 deletions(-) + +Index: dcmtk-3.6.0/dcmimgle/include/dcmtk/dcmimgle/diinpxt.h +=================================================================== +--- dcmtk-3.6.0.orig/dcmimgle/include/dcmtk/dcmimgle/diinpxt.h 2010-10-14 15:16:26.000000000 +0200 ++++ dcmtk-3.6.0/dcmimgle/include/dcmtk/dcmimgle/diinpxt.h 2013-05-28 14:47:03.782871278 +0200 +@@ -172,7 +172,12 @@ + */ + virtual ~DiInputPixelTemplate() + { ++#if defined(HAVE_STD__NOTHROW) && defined(HAVE_NOTHROW_DELETE) ++ /* use a non-throwing delete (if available) */ ++ operator delete[] (Data, std::nothrow); ++#else + delete[] Data; ++#endif + } + + /** determine minimum and maximum pixel value +@@ -382,7 +387,12 @@ + #endif + /* allocate temporary buffer, even number of bytes required for getUncompressedFrame() */ + const Uint32 extraByte = ((sizeof(T1) == 1) && (count_T1 & 1)) ? 1 : 0; ++#ifdef HAVE_STD__NOTHROW ++ /* use a non-throwing new here (if available) because the allocated buffer can be huge */ ++ pixel = new (std::nothrow) T1[count_T1 + extraByte]; ++#else + pixel = new T1[count_T1 + extraByte]; ++#endif + if (pixel != NULL) + { + if (uncompressed) +@@ -444,7 +454,12 @@ + // # old code: Count = ((lengthBytes * 8) + bitsAllocated - 1) / bitsAllocated; + Count = 8 * length_B1 + (8 * length_B2 + bitsAllocated - 1) / bitsAllocated; + register unsigned long i; ++#ifdef HAVE_STD__NOTHROW ++ /* use a non-throwing new here (if available) because the allocated buffer can be huge */ ++ Data = new (std::nothrow) T2[Count]; ++#else + Data = new T2[Count]; ++#endif + if (Data != NULL) + { + DCMIMGLE_TRACE("Input length: " << lengthBytes << " bytes, Pixel count: " << Count +@@ -609,13 +624,18 @@ + } + } + } else { +- // in case of error, reset pixel count variable ++ /* in case of error, reset pixel count variable */ + Count = 0; + } + if (deletePixel) + { +- // delete temporary buffer ++ /* delete temporary buffer */ ++#if defined(HAVE_STD__NOTHROW) && defined(HAVE_NOTHROW_DELETE) ++ /* use a non-throwing delete (if available) */ ++ operator delete[] (pixel, std::nothrow); ++#else + delete[] pixel; ++#endif + } + } + Modified: trunk/packages/dcmtk/trunk/debian/patches/series =================================================================== --- trunk/packages/dcmtk/trunk/debian/patches/series 2013-05-28 11:54:58 UTC (rev 13730) +++ trunk/packages/dcmtk/trunk/debian/patches/series 2013-05-28 13:16:24 UTC (rev 13731) @@ -12,3 +12,6 @@ bug674361.patch underlink.patch use_correct_number_of_TS.patch +fixnull.patch +nothrow.patch +noleak.patch Modified: trunk/packages/dcmtk/trunk/debian/rules =================================================================== --- trunk/packages/dcmtk/trunk/debian/rules 2013-05-28 11:54:58 UTC (rev 13730) +++ trunk/packages/dcmtk/trunk/debian/rules 2013-05-28 13:16:24 UTC (rev 13731) @@ -12,6 +12,7 @@ # Package installation directories pkg=dcmtk PKGDIR_DCMTK=$(CURDIR)/debian/$(pkg) +PKGDIR_DCMTK_DATA=$(CURDIR)/debian/libdcmtk-data PKGDIR_DCMTK_LIB=$(CURDIR)/debian/libdcmtk2 PKGDIR_DCMTK_DEV=$(CURDIR)/debian/libdcmtk2-dev PKGDIR_DCMTK_DOC=$(CURDIR)/debian/$(pkg)-doc @@ -186,7 +187,6 @@ dh_installman -a dh_install -a chmod 755 $(PKGDIR_DCMTK_WWW)/usr/lib/dcmtk/cgi-bin/*.p[lh] - mv $(PKGDIR_DCMTK)/usr/share/dcmtk/*.dic $(PKGDIR_DCMTK_LIB)/usr/share/dcmtk/ dh_link -a dh_lintian -a dh_strip --dbg-package=libdcmtk2-dbg -a _______________________________________________ debian-med-commit mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
