i=dmitry
i=andrew
The space allocated to ll_instance to store the "%p" notation for a
pointer was failing to allocate enough space for the leading "0x" in
addition to the space for the actual address bytes.
struct lustre_md md;
class_uuid_t uuid;
struct config_llog_instance cfg = {0, };
struct lustre_md md;
class_uuid_t uuid;
struct config_llog_instance cfg = {0, };
- char ll_instance[sizeof(sbi) * 2 + 1];
+ char ll_instance[sizeof(sbi) * 2 + 3];
struct lustre_profile *lprof;
char *zconf_mgsnid, *zconf_profile;
char *osc = NULL, *mdc = NULL;
struct lustre_profile *lprof;
char *zconf_mgsnid, *zconf_profile;
char *osc = NULL, *mdc = NULL;
/* generate a string unique to this super, let's try
the address of the super itself.*/
/* generate a string unique to this super, let's try
the address of the super itself.*/
- sprintf(ll_instance, "%p", sbi);
+ snprintf(ll_instance, sizeof(ll_instance), "%p", sbi);
/* retrive & parse config log */
cfg.cfg_instance = ll_instance;
/* retrive & parse config log */
cfg.cfg_instance = ll_instance;