[med-svn] [conquest-dicom-server] 01/04: Patch to fix array out of bounds in dgate.cpp

Pablo Lorenzzoni spectra at moszumanska.debian.org
Wed Feb 5 17:33:25 UTC 2014


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

spectra pushed a commit to branch master
in repository conquest-dicom-server.

commit 2c0077af8638682e93787897a3316a2bbba3c7e7
Author: Pablo Lorenzzoni <spectra at debian.org>
Date:   Tue Feb 4 17:41:48 2014 -0200

    Patch to fix array out of bounds in dgate.cpp
---
 debian/patches/0008-Fix-cppcheck-bug-6.patch | 26 ++++++++++++++++++++++++++
 debian/patches/series                        |  1 +
 2 files changed, 27 insertions(+)

diff --git a/debian/patches/0008-Fix-cppcheck-bug-6.patch b/debian/patches/0008-Fix-cppcheck-bug-6.patch
new file mode 100644
index 0000000..6afd322
--- /dev/null
+++ b/debian/patches/0008-Fix-cppcheck-bug-6.patch
@@ -0,0 +1,26 @@
+From: Pablo Lorenzzoni <spectra at debian.org>
+Date: Tue, 4 Feb 2014 17:40:17 -0200
+Subject: Fix cppcheck bug #6
+
+[dgate.cpp:5955]: (error) Array 'items[4]' index 4 out of bounds
+---
+ dgate.cpp |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/dgate.cpp b/dgate.cpp
+index cc440aa..2dce88e 100644
+--- a/dgate.cpp
++++ b/dgate.cpp
+@@ -5951,10 +5951,10 @@ extern "C"
+     const char *items[4];
+     SQLLEN SQLResultLength;
+     for (i=0; i<4; i++) items[i]=lua_tostring(L,i+1);
+-    if (items[1]) for (i=0; i<strlen(items[1]); i++) if (items[1][i]==',') flds++;
++    if (items[0]) for (i=0; i<strlen(items[0]); i++) if (items[0][i]==',') flds++;
++    if (items[1]) if (*items[1]==0) items[1]=NULL;
+     if (items[2]) if (*items[2]==0) items[2]=NULL;
+     if (items[3]) if (*items[3]==0) items[3]=NULL;
+-    if (items[4]) if (*items[4]==0) items[4]=NULL;
+ 
+     Database DB;
+     if (DB.Open ( DataSource, UserName, Password, DataHost ) )
diff --git a/debian/patches/series b/debian/patches/series
index 2d470ce..b39f937 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,3 +5,4 @@
 0005-Separate-option-and-description-in-PrintOptions.patch
 0006-Add-DebianBaseDir-at-dgate.cpp.patch
 0007-Change-port-for-CONQUESTSRV1-in-acrnema.map.patch
+0008-Fix-cppcheck-bug-6.patch

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



More information about the debian-med-commit mailing list