From d411b706bce99552155c0cc12c1ffb77f49aee4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Nie=C3=9Fen?= Date: Mon, 29 May 2023 20:47:10 +0000 Subject: [PATCH] Fix race condition in helper script `kem/*/nist` must not be deleted before `find kem/*/` completes. --- deps/mceliece/extract-kem-from-nist-submission | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/deps/mceliece/extract-kem-from-nist-submission b/deps/mceliece/extract-kem-from-nist-submission index 45810e7..ec3469e 100755 --- a/deps/mceliece/extract-kem-from-nist-submission +++ b/deps/mceliece/extract-kem-from-nist-submission @@ -59,14 +59,14 @@ patch_files() { id=$1 ( - # Only required for the NIST submission. - echo kem/$id/nist # Non-source files. find kem/$id/ -type f ! -name '*.c' ! -name '*.h' + # Only required for the NIST submission. + echo kem/$id/nist # Irrelevant header files. echo kem/$id/api.h ) | while read f; do - rm -rf "$f" + rm -r "$f" echo "- Removed $f" done