summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrnhmjoj <rnhmjoj@inventati.org>2020-02-07 17:47:52 +0100
committerrnhmjoj <rnhmjoj@inventati.org>2020-02-07 17:47:52 +0100
commit81a61c049e6de80120531f0770b22e7637c9acb9 (patch)
treee0451488ea55aa192cdac1a442513332ed291fa6
parent51e8117654fb092ae5412d7aa184bfc6b498c954 (diff)
Fix uninitialised memory write
If macTime() fails write zeros instead of unitialized memory to the date fields.
-rw-r--r--write.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/write.c b/write.c
index 318adef..c8a86e4 100644
--- a/write.c
+++ b/write.c
@@ -434,8 +434,8 @@ fixupChecksum(FILE *out, int full_length, int head_position)
static int
writehead(FILE* out, FontPtr font)
{
- int time_hi;
- unsigned time_lo;
+ int time_hi = 0;
+ unsigned time_lo = 0;
macTime(&time_hi, &time_lo);