summaryrefslogtreecommitdiff
path: root/test/interactive-helper/createdeb-cve-2020-27350.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/interactive-helper/createdeb-cve-2020-27350.cc')
-rw-r--r--test/interactive-helper/createdeb-cve-2020-27350.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/interactive-helper/createdeb-cve-2020-27350.cc b/test/interactive-helper/createdeb-cve-2020-27350.cc
index a290c0ac2..7fc9b0e55 100644
--- a/test/interactive-helper/createdeb-cve-2020-27350.cc
+++ b/test/interactive-helper/createdeb-cve-2020-27350.cc
@@ -231,7 +231,7 @@ static void createtar(const int fd)
struct TarHeader t;
char buf[512];
} t;
- for (int i = 0; i < sizeof(t.buf); i++)
+ for (size_t i = 0; i < sizeof(t.buf); i++)
t.buf[i] = '7';
memcpy(t.t.Name, "unterminatedName", 16);
memcpy(t.t.UserName, "userName", 8);
@@ -247,11 +247,11 @@ static void createtar(const int fd)
memset(t.t.Checksum, ' ', sizeof(t.t.Checksum));
unsigned long sum = 0;
- for (int i = 0; i < sizeof(t.buf); i++)
+ for (size_t i = 0; i < sizeof(t.buf); i++)
sum += t.buf[i];
int written = sprintf(t.t.Checksum, "%lo", sum);
- for (int i = written; i < sizeof(t.t.Checksum); i++)
+ for (size_t i = written; i < sizeof(t.t.Checksum); i++)
t.t.Checksum[i] = ' ';
write_chk(fd, t.buf, sizeof(t.buf));
}