[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#368974: marked as done (C++'s CommonFG::getObjnameByIdx(hsize_t idx) returns a truncated string)



Your message dated Sat, 28 Oct 2006 10:35:41 +0200
with message-id <87lkn03kiq.fsf@debian.org>
and subject line Fixed in NMU of hdf5 1.6.5-2.1
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: libhdf5-serial-dev
Version: 1.6.5-2
Severity: normal
Tags: patch

Hello,

thanks for maintaining libhdf5.

I was quite surprised that CommonFG::getObjnameByIdx returns a string
without the last character.  I investigated a bit and this little fix
seems to solve the problem:

diff -Naur hdf5-1.6.5.orig/c++/src/H5CommonFG.cpp hdf5-1.6.5/c++/src/H5CommonFG.cpp
--- hdf5-1.6.5.orig/c++/src/H5CommonFG.cpp	2005-10-01 17:30:03.000000000 +0200
+++ hdf5-1.6.5/c++/src/H5CommonFG.cpp	2006-05-25 21:48:39.279154480 +0200
@@ -898,8 +898,8 @@
     }
 
     // now, allocate C buffer to get the name
-    char* name_C = new char[name_len];
-    name_len = H5Gget_objname_by_idx(getLocId(), idx, name_C, name_len);
+    char* name_C = new char[name_len + 1];
+    name_len = H5Gget_objname_by_idx(getLocId(), idx, name_C, name_len + 1);
 
     // clean up and return the string
     string name = string(name_C);

It seems that the people who made the C++ wrapper had temporarily
forgotten that C strings are 0-terminated.

I rebuilt the hdf5 packages with that patch and it now works fine.


Best regards,

Enrico


-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.16-1-686
Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8)

Versions of packages libhdf5-serial-dev depends on:
ii  libc6-dev                     2.3.6-9    GNU C Library: Development Librari
ii  libhdf5-serial-1.6.5-0        1.6.5-2    Hierarchical Data Format 5 (HDF5) 
ii  libjpeg62-dev                 6b-13      Development files for the IJG JPEG
ii  zlib1g-dev                    1:1.2.3-11 compression library - development

libhdf5-serial-dev recommends no packages.

-- no debconf information


--- End Message ---
--- Begin Message ---
Source: hdf5
Source-Version: 1.6.5-2.1

Now that hdf5 is orphaned, bugs fixed in non-maintainer uploads can be
closed.  The original .changes file follows.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Wed, 20 Sep 2006 10:34:22 +0200
Source: hdf5
Binary: libhdf5-lam-dev hdf5-tools libhdf5-mpich-dev libhdf5-mpich-1.6.5-0 libhdf5-serial-dev libhdf5-doc libhdf5-lam-1.6.5-0 libhdf5-serial-1.6.5-0
Architecture: source all i386
Version: 1.6.5-2.1
Distribution: unstable
Urgency: low
Maintainer: Josselin Mouette <joss@debian.org>
Changed-By: Enrico Zini <enrico@debian.org>
Description:
 hdf5-tools - Hierarchical Data Format 5 (HDF5) - Runtime tools
 libhdf5-doc - Hierarchical Data Format 5 (HDF5) - Documentation
 libhdf5-lam-1.6.5-0 - Hierarchical Data Format 5 (HDF5) - runtime files - LAM version
 libhdf5-lam-dev - Hierarchical Data Format 5 (HDF5) - development files - LAM versi
 libhdf5-mpich-1.6.5-0 - Hierarchical Data Format 5 (HDF5) - runtime files - MPICH version
 libhdf5-mpich-dev - Hierarchical Data Format 5 (HDF5) - development files - MPICH ver
 libhdf5-serial-1.6.5-0 - Hierarchical Data Format 5 (HDF5) - runtime files - serial versio
 libhdf5-serial-dev - Hierarchical Data Format 5 (HDF5) - development files - serial ve
Closes: 368974
Changes:
 hdf5 (1.6.5-2.1) unstable; urgency=low
 .
   * Non maintainer upload
   * Added patch to fix CommonFG::getObjnameByIdx.  Closes: #368974
Files:
 bce8b79f88a6e4998426fcf52cc77172 778 science optional hdf5_1.6.5-2.1.dsc
 97fa98b0987caa72f490fd9d1a8ae4fa 522437 science optional hdf5_1.6.5-2.1.diff.gz
 675cb012fcf6971512160ba05d8e8791 1895662 doc optional libhdf5-doc_1.6.5-2.1_all.deb
 65772239fbc71526d45341688c3acd80 608654 libs optional libhdf5-serial-1.6.5-0_1.6.5-2.1_i386.deb
 4148848cee3738bdfcdb1cb8b4eb28bf 740698 libdevel optional libhdf5-serial-dev_1.6.5-2.1_i386.deb
 23179b27c48838423ca3c02a48f45462 513034 libs extra libhdf5-lam-1.6.5-0_1.6.5-2.1_i386.deb
 491928423c7aef11acc89f45500c9955 616884 libdevel extra libhdf5-lam-dev_1.6.5-2.1_i386.deb
 23d1dc4e381c8c01a2f4e4c3ffbab712 683346 libs extra libhdf5-mpich-1.6.5-0_1.6.5-2.1_i386.deb
 5c91990be500d7841bc1a561f1f4a7bc 616590 libdevel extra libhdf5-mpich-dev_1.6.5-2.1_i386.deb
 fdf34e13dc52fa670800dbeece05b357 214082 science optional hdf5-tools_1.6.5-2.1_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFFFmf59LSwzHl+v6sRAtSiAJ4hX1Vi+2ADF2YCrh1i69etrMS0hwCePjKq
PPBKpGeVSQrhY0WNbBHXHzI=
=CnU2
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: