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
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]