From: Olivier Matz Date: Mon, 13 Jul 2020 11:51:14 +0000 (+0200) Subject: examples/fips_validation: ignore \r in input files X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=9339a1ec6102e4e018abdc5bc844f617185c1baf;p=dpdk.git examples/fips_validation: ignore \r in input files Some test vectors contain '\r' before '\n' (see link). Ignore them. Link: https://www.openssl.org/docs/fips/testvectors-linux-2007-10-10.tar.gz Fixes: 3d0fad56b74a ("examples/fips_validation: add crypto FIPS application") Signed-off-by: Olivier Matz --- diff --git a/examples/fips_validation/fips_validation.c b/examples/fips_validation/fips_validation.c index 13f763c9aa..858f581ba3 100644 --- a/examples/fips_validation/fips_validation.c +++ b/examples/fips_validation/fips_validation.c @@ -33,6 +33,8 @@ get_file_line(void) if (loc >= MAX_LINE_CHAR - 1) return -ENOMEM; + if (c == '\r') + continue; if (c == '\n') break; line[loc++] = c;