Array bounds overrun
micahahoward opened this issue · 1 comments
micahahoward commented
I recently built libhio with Clang and it pointed out an array bounds overrun in hio_dataset.c:
int hioi_dataset_aggregate_statistics (hio_dataset_t dataset) {
hio_context_t context = hioi_object_context (&dataset->ds_object);
uint64_t tmp[7];
/* collect statistics now so they can be included in the manifest */
tmp[0] = dataset->ds_stat.s_bread;
tmp[1] = dataset->ds_stat.s_bwritten;
tmp[2] = dataset->ds_stat.s_rtime;
tmp[3] = dataset->ds_stat.s_wtime;
tmp[4] = atomic_load(&dataset->ds_stat.s_rcount);
tmp[5] = atomic_load(&dataset->ds_stat.s_wcount);
tmp[6] = dataset->ds_stat.s_ctime;
tmp[7] = dataset->ds_stat.s_ftime;
tmp[8] = atomic_load(&dataset->ds_stat.s_fcount);
Thought you might like to know.
hjelmn commented
Thanks. Will push a fix for the next release.