[sheepdog] [PATCH] sheep: fix missing trailing '\0' in the store list string
MORITA Kazutaka
morita.kazutaka at lab.ntt.co.jp
Sun May 20 17:18:11 CEST 2012
At Sun, 20 May 2012 10:39:51 -0400,
Christoph Hellwig wrote:
>
> On Sun, May 20, 2012 at 11:27:33PM +0900, MORITA Kazutaka wrote:
> > @@ -312,7 +312,7 @@ static int local_get_store_list(struct request *req)
> > list_for_each_entry(driver, &store_drivers, list) {
> > strbuf_addf(&buf, "%s ", driver->name);
> > }
> > - memcpy(req->data, buf.buf, buf.len);
> > + memcpy(req->data, buf.buf, buf.len + 1);
>
> Can we add a strbuf_copyout helper to avoid this bitfall for other
> users?
Yes, I'll send the patch soon.
Thanks,
Kazutaka
More information about the sheepdog
mailing list