From e8084cb50601faec7d96a42f189a44997af5bfdd Mon Sep 17 00:00:00 2001 From: Demi Marie Obenour Date: Wed, 12 Jun 2024 09:37:27 -0400 Subject: [PATCH] tar2qfile: Break early if directory headers sent already There is no reason to continue a loop if subsequent iterations will not have useful effects. (cherry picked from commit 1a2cd9354a0a175d0e8b7e522b7ff972c374dcca) --- qubes-rpc/tar2qfile.c | 1 + 1 file changed, 1 insertion(+) diff --git a/qubes-rpc/tar2qfile.c b/qubes-rpc/tar2qfile.c index c7e3896c..2b9c8c09 100644 --- a/qubes-rpc/tar2qfile.c +++ b/qubes-rpc/tar2qfile.c @@ -750,6 +750,7 @@ ustar_rd (int fd, struct file_header * untrusted_hdr, char *buf, struct stat * s fprintf(stderr,"Directory headers already sent\n"); #endif dir_found=1; + break; } } if (dir_found == 0) {