From: malaterre Date: Wed, 28 Jul 2004 21:10:07 +0000 (+0000) Subject: FIX: valgrind reported this one: X-Git-Tag: Version0.5.bp~32 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=92f5a86037e9d7f6feba3eb5c3d97ab9d7b2c423;hp=c437a99c0660bfd7712b98b4d60d37fac051d658;p=gdcm.git FIX: valgrind reported this one: UMR ==23598== Use of uninitialised value of size 4 ==23598== at 0x77C5B7: isalpha (in /lib/tls/libc-2.3.2.so) ==23598== by 0x3C2CAB2E: gdcmDocument::FindDocEntryVR(gdcmDocEntry*) (gdcmDocument.cxx:1783) ==23598== by 0x3C2CCE83: gdcmDocument::ReadNextDocEntry() (gdcmDocument.cxx:2556) ==23598== by 0x3C2C985C: gdcmDocument::ParseSQ(gdcmSeqEntry*, long, long, bool) (gdcmDocument.cxx:1422) ==23598== by 0x3C2C9792: gdcmDocument::ParseDES(gdcmDocEntrySet*, long, long, bool) (gdcmDocument.cxx:1391) ==23598== by 0x3C2C5858: gdcmDocument::gdcmDocument(std::string const&, bool, bool, bool) (gdcmDocument.cxx:130) ==23598== by 0x3C2B19FA: gdcmHeader::gdcmHeader(std::string const&, bool, bool, bool) (gdcmHeader.cxx:47) ==23598== by 0x8053824: PrintAllDocument(int, char**) (PrintAllDocument.cxx:34) ==23598== by 0x8050D3E: main (gdcmTests.cxx:173) ==23598== --- diff --git a/src/gdcmDocument.cxx b/src/gdcmDocument.cxx index a13de9d0..fae37a03 100644 --- a/src/gdcmDocument.cxx +++ b/src/gdcmDocument.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDocument.cxx,v $ Language: C++ - Date: $Date: 2004/07/20 08:29:13 $ - Version: $Revision: 1.56 $ + Date: $Date: 2004/07/28 21:10:07 $ + Version: $Revision: 1.57 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -1777,7 +1777,7 @@ void gdcmDocument::FindDocEntryVR( gdcmDocEntry *entry ) // is in explicit VR and try to fix things if it happens not to be // the case. - fread (&vr, (size_t)2,(size_t)1, Fp); + fread (vr, (size_t)2,(size_t)1, Fp); vr[2] = 0; if( !CheckDocEntryVR(entry, vr) )