Bug in H5LTdtype_to_text

Hello,

There is a bug in H5LTdtype_to_text (version 1.8.11, anyway). If a user buffer is passed in along with the length the function does not truncate

···

at the end of the buffer, but may walk off the end of the user buffer. The problem is in realloc_and_append which does not check the size of the buffer before concatenating. One could also view this as a documentation error, as the document says the the function will truncate the string.

Jason

---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com

Hi Jason,

I entered a bug report for this.

Thanks!
-Barbara
help@hdfgroup.org

···

-----Original Message-----
From: Hdf-forum [mailto:hdf-forum-bounces@lists.hdfgroup.org] On Behalf Of Jason Sommerville
Sent: Friday, June 27, 2014 8:28 AM
To: hdf-forum@lists.hdfgroup.org
Subject: [Hdf-forum] Bug in H5LTdtype_to_text

Hello,

There is a bug in H5LTdtype_to_text (version 1.8.11, anyway). If a user buffer is passed in along with the length the function does not truncate at the end of the buffer, but may walk off the end of the user buffer.
The problem is in realloc_and_append which does not check the size of the buffer before concatenating.

One could also view this as a documentation error, as the document says the the function will truncate the string.

Jason

---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@lists.hdfgroup.org
http://mail.lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5