On Mo, 2021-07-26 at 17:17 -0500, Benjamin Marzinski wrote: > On Thu, Jul 15, 2021 at 12:52:15PM +0200, mwilck@xxxxxxxx wrote: > > From: Martin Wilck <mwilck@xxxxxxxx> > > > > -int dm_get_status(const char *name, char *outstatus) > > +int dm_get_status(const char *name, char **outstatus) > > { > > int r = DMP_ERR; > > struct dm_task *dmt; > > @@ -799,8 +800,12 @@ int dm_get_status(const char *name, char > > *outstatus) > > goto out; > > } > > > > - if (snprintf(outstatus, PARAMS_SIZE, "%s", status) <= > > PARAMS_SIZE) > > + if (!outstatus) > > r = DMP_OK; > > + else { > > + *outstatus = strdup(status); > > + r = outstatus ? DMP_OK : DMP_ERR; > > Missing the dereference here "r = *outstatus ?" Yes. Thanks for spotting it. -- dm-devel mailing list dm-devel@xxxxxxxxxx https://listman.redhat.com/mailman/listinfo/dm-devel