csv: detect end of csv file correctly
csv: detect end of csv file correctly

.sbat sections contain user supplied data. We should not assume that it is
well formed. The last line feed might be missing or it might not be at the
end of the file. Instead one or more \0 might follow.

In parse_csv_data() variable 'line' is a pointer with a value between
the values of 'data' and 'data_end'.

There is no reason to check that it is non-zero after assigning it
from 'data' as we already check 'data'.

Instead at the beginning of the file and after each line we must check that
we have not reached the end of the file marked by a '\0' character.

Signed-off-by: Heinrich Schuchardt <d0f16556e4bb5a699e5016a06ebfc6cd472096d1@canonical.com>

rhinstaller/shim,rhinstaller/shim,rhinstaller/shim