[lxc-devel] [PATCH] bdev_copy segfaults if bdevtype is NULL

Serge Hallyn serge.hallyn at ubuntu.com
Wed Sep 4 13:53:27 UTC 2013


Quoting S.Çağlar Onur (caglar at 10ur.org):
> Signed-off-by: S.Çağlar Onur <caglar at 10ur.org>

Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>

> ---
>  src/lxc/bdev.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/lxc/bdev.c b/src/lxc/bdev.c
> index 39592b2..b45f2cb 100644
> --- a/src/lxc/bdev.c
> +++ b/src/lxc/bdev.c
> @@ -1939,7 +1939,7 @@ struct bdev *bdev_copy(const char *src, const char *oldname, const char *cname,
>  		bdevtype = "overlayfs";
>  
>  	*needs_rdep = 0;
> -	if (strcmp(orig->type, "dir") == 0 &&
> +	if (bdevtype && strcmp(orig->type, "dir") == 0 &&
>  			strcmp(bdevtype, "overlayfs") == 0)
>  		*needs_rdep = 1;
>  
> -- 
> 1.8.1.2
> 
> 
> ------------------------------------------------------------------------------
> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
> Discover the easy way to master current and previous Microsoft technologies
> and advance your career. Get an incredible 1,500+ hours of step-by-step
> tutorial videos with LearnDevNow. Subscribe today and save!
> http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
> _______________________________________________
> Lxc-devel mailing list
> Lxc-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lxc-devel




More information about the lxc-devel mailing list