[LTP] [PATCH v7 1/3] lib: alter find_free_loopdev()

Petr Vorel pvorel@suse.cz
Wed Jul 31 14:05:03 CEST 2019


Hi Xu,

Reviewed-by: Petr Vorel <pvorel@suse.cz>

...
> +++ b/lib/tst_device.c
...
> -			return 0;
> +			if (path != NULL)
> +				strncpy(path, buf, path_len);
Is it safe to assume that path_len is *always* < 1024 (size of buf)?
> +			return i;
...


Kind regards,
Petr


More information about the ltp mailing list