1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

dmsetup: Fix multi-line concise table parsing

Use the correct loop variable within the loop, instead of reusing the
initial value.  Table lines after the first don't get terminated in
the right place.

Signed-off-by: Kurt Garloff <kurt@garloff.de>
This commit is contained in:
Alasdair G Kergon 2019-02-25 13:41:51 +00:00
parent eff33684f7
commit ccfbd505fe

View File

@ -368,7 +368,7 @@ static int _parse_table_lines(struct dm_task *dmt)
do {
/* Identify and terminate each line */
if ((next_pos = strchr(_table, '\n')))
if ((next_pos = strchr(pos, '\n')))
*next_pos++ = '\0';
if (!_parse_line(dmt, pos, "", ++line))
return_0;