summaryrefslogtreecommitdiff
path: root/lib/variables.c
diff options
context:
space:
mode:
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2021-08-29 20:47:46 +0200
committerPeter Jones <pjones@redhat.com>2021-09-08 10:41:28 -0400
commitecaf92ac2e34923b4b98e06e9d86e42ee18ae21f (patch)
tree040bb75ffb9bfa7b4ca31b05217d9f88ea6aa92f /lib/variables.c
parent72a95aef81e6fb82f6b467cf2890f8b38a75aea1 (diff)
downloadefi-boot-shim-ecaf92ac2e34923b4b98e06e9d86e42ee18ae21f.tar.gz
efi-boot-shim-ecaf92ac2e34923b4b98e06e9d86e42ee18ae21f.zip
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 <heinrich.schuchardt@canonical.com>
Diffstat (limited to 'lib/variables.c')
0 files changed, 0 insertions, 0 deletions