[med-svn] [dcmtk] 03/05: d/p/10:Add fix for possible string overflow

Gert Wollny gewo at moszumanska.debian.org
Thu Sep 7 09:04:52 UTC 2017


This is an automated email from the git hooks/post-receive script.

gewo pushed a commit to branch master
in repository dcmtk.

commit 35d06069aeedefc474ffe3d73a541e7e76eb2a1a
Author: Gert Wollny <gewo at debian.org>
Date:   Wed Sep 6 08:20:44 2017 +0000

    d/p/10:Add fix for possible string overflow
---
 debian/patches/10_correct_format_output_size.patch | 19 +++++++++++++++++++
 debian/patches/series                              |  1 +
 2 files changed, 20 insertions(+)

diff --git a/debian/patches/10_correct_format_output_size.patch b/debian/patches/10_correct_format_output_size.patch
new file mode 100644
index 0000000..11fbd88
--- /dev/null
+++ b/debian/patches/10_correct_format_output_size.patch
@@ -0,0 +1,19 @@
+Author: Gert Wollny <gw.fossdev at gmail.com>
+Description: Fix warning about writing beyond end of character array. 
+ Actually, the overflow is _very_unlikely, because having a series with 
+ more  then one million frames in a series is highly unlikely, but this 
+ fix has no relevant implications on the memory and runtime footprint of 
+ the code. 
+Last-Changed: 2017-09-06
+ 
+--- a/dcmnet/apps/storescp.cc
++++ b/dcmnet/apps/storescp.cc
+@@ -2470,7 +2470,7 @@
+     // determine the new file name: The first two characters of the old file name make up the [modality-prefix].
+     // The value for [consecutive-numbering] will be determined using the counter variable.
+     char modalityId[3];
+-    char newFileName[9];
++    char newFileName[13];
+     if (opt_timeNames)
+     {
+       // modality prefix are the first 2 characters after serial number (if present)
diff --git a/debian/patches/series b/debian/patches/series
index fe41440..17b50fc 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -7,3 +7,4 @@
 07_dont_export_all_executables.patch
 08_remove_system_processor.patch
 09_fix_format_on_32bit.patch
+10_correct_format_output_size.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/dcmtk.git



More information about the debian-med-commit mailing list