ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: "Ivan A. Melnikov" <iv@altlinux.org>
To: devel@lists.altlinux.org
Subject: Re: [devel] Помогите побороть ошибку в gdcm
Date: Sun, 27 Nov 2011 18:40:55 +0400
Message-ID: <20111127184055.06aa3e2d@deimos.localdomain> (raw)
In-Reply-To: <4ED1F3D2.6080101@tangramltd.com>

[-- Attachment #1: Type: text/plain, Size: 977 bytes --]

On Sun, 27 Nov 2011 03:24:50 -0500
Dubrovskiy Viacheslav <slava@tangramltd.com> wrote:

> Здравствуйте
> 
> Пытаюсь собрать http://sourceforge.net/projects/gdcm/
> DiCoM is a C++ library for DICOM medical files
> 
> При сборке получаю вот такую ошибку. Смотрел спеки в федоре, дебиане
> - у них все собирается без дополнительных патчей.
> Помогите исправить плиз.
[...]

Вариант патча в аттаче. Переполнение буфера там правда есть, gcc прав.
Советую связаться с апстримом, тем более что, хотя моё исправление
выглядит надёжным для этой проблемы, что конкретно *должен* делать этот
код я не разбирался.

-- 
WBR,
Ivan A. Melnikov

[-- Attachment #2: gdcm-2.0.18-alt-fix-overflow.patch --]
[-- Type: text/x-patch, Size: 555 bytes --]

diff --git a/Source/DataStructureAndEncodingDefinition/gdcmElement.h b/Source/DataStructureAndEncodingDefinition/gdcmElement.h
index 54e3796..9e8f176 100644
--- a/Source/DataStructureAndEncodingDefinition/gdcmElement.h
+++ b/Source/DataStructureAndEncodingDefinition/gdcmElement.h
@@ -690,7 +690,7 @@ template<>
 class Element<VR::AS, VM::VM5>
 {
 public:
-  char Internal[VMToLength<VM::VM5>::Length];
+  char Internal[VMToLength<VM::VM5>::Length * sizeof( VRToType<VR::AS>::Type )];
   void Print(std::ostream &_os) const {
     _os << Internal;
     }

           reply	other threads:[~2011-11-27 14:40 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <4ED1F3D2.6080101@tangramltd.com>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111127184055.06aa3e2d@deimos.localdomain \
    --to=iv@altlinux.org \
    --cc=devel@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git