[rrd-developers] [BUG] rrd_open bugs when handling truncated files
kevin brintnall
kbrint at rufus.net
Fri Oct 3 22:02:12 CEST 2008
Tobi,
Right now, truncated files may cause crashes with MMAP. This is because
we only MMAP the file size, but we write to memory based on which DS we
think we're operating on. Since there's no bounds checking after the file
is opened, a truncated file may trigger a memory access outside of the
mmap()'ed region.
The following two patches fix the issue:
* The first patch makes sure that we do not extend past the end of the
file when reading the header.
* the second patch makes sure that the data portion of the file
is large enough, based on the ds_cnt and the total number of RRA rows
More information about the rrd-developers
mailing list