aboutsummaryrefslogtreecommitdiffstats
path: root/key2root-rmkey.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2023-06-23 12:25:18 +0200
committerMattias Andrée <maandree@kth.se>2023-06-23 12:25:18 +0200
commit748904541e5857952f1281745b3c93c8265f2c4b (patch)
tree153272160eb0cc2c02bf02566818bb3cfde69b95 /key2root-rmkey.c
parentkey2root-rmkey, key2root-lskeys: check for NUL byte on truncated line (diff)
downloadkey2root-748904541e5857952f1281745b3c93c8265f2c4b.tar.gz
key2root-748904541e5857952f1281745b3c93c8265f2c4b.tar.bz2
key2root-748904541e5857952f1281745b3c93c8265f2c4b.tar.xz
Add key lookup to key2root-addkey and fix writeall
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--key2root-rmkey.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/key2root-rmkey.c b/key2root-rmkey.c
index 1165435..1b4a366 100644
--- a/key2root-rmkey.c
+++ b/key2root-rmkey.c
@@ -26,7 +26,7 @@ writeall(int fd, const char *data, size_t len)
size_t off = 0;
ssize_t r;
- for (;;) {
+ while (off < len) {
r = write(fd, &data[off], len - off);
if (r < 0)
return -1;