The only use of this was incorrect - block_name has size RBD_MAX_BLOCK_NAME_SIZE.
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
#define RBD_MAX_OBJ_NAME_SIZE 96
#define RBD_MAX_BLOCK_NAME_SIZE 24
-#define RBD_MAX_SEG_NAME_SIZE 128
#define RBD_COMP_NONE 0
#define RBD_CRYPT_NONE 0
string get_block_oid(rbd_obj_header_ondisk *header, uint64_t num)
{
- char o[RBD_MAX_SEG_NAME_SIZE];
- snprintf(o, RBD_MAX_SEG_NAME_SIZE,
+ char o[RBD_MAX_BLOCK_NAME_SIZE];
+ snprintf(o, RBD_MAX_BLOCK_NAME_SIZE,
"%s.%012" PRIx64, header->block_name, num);
return o;
}