1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
From ac13999810bced8f623b0e027579a95f23dc0641 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kov=C3=A1cs=2C=20Gerg=C5=91=20Ferenc?= <kovgeri01@gmail.com>
Date: Mon, 5 Feb 2024 23:01:08 +0100
Subject: [PATCH] secure-logging: Changed local variable type as
g_io_channel_write_chars as it's 4th parameter accepts gsize.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Kovács, Gergő Ferenc <kovgeri01@gmail.com>
---
modules/secure-logging/slog.c | 3 ++-
modules/secure-logging/tests/test_secure_logging.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/modules/secure-logging/slog.c b/modules/secure-logging/slog.c
index 7bc8fcf7d4..4f585fe599 100644
--- a/modules/secure-logging/slog.c
+++ b/modules/secure-logging/slog.c
@@ -1,4 +1,5 @@
/*
+ * Copyright (c) 2024 Gergo Ferenc Kovacs
* Copyright (c) 2019 Airbus Commercial Aircraft
*
* This library is free software; you can redistribute it and/or
@@ -932,7 +933,7 @@ int writeKey(char *key, guint64 counter, gchar *keypath)
return 0;
}
- guint64 outlen = 0;
+ gsize outlen = 0;
// Write key
status = g_io_channel_write_chars(keyfile, key, KEY_LENGTH, &outlen, &error);
if(status != G_IO_STATUS_NORMAL)
diff --git a/modules/secure-logging/tests/test_secure_logging.c b/modules/secure-logging/tests/test_secure_logging.c
index 0f11d52e6d..0005b48652 100644
--- a/modules/secure-logging/tests/test_secure_logging.c
+++ b/modules/secure-logging/tests/test_secure_logging.c
@@ -1,4 +1,5 @@
/*
+ * Copyright (c) 2024 Gergo Ferenc Kovacs
* Copyright (c) 2019 Airbus Commercial Aircraft
*
* This library is free software; you can redistribute it and/or
@@ -373,7 +374,7 @@ void corruptKey(TestData *testData)
cr_assert(status == G_IO_STATUS_NORMAL, " Unable to set encoding for key file %s", testData->keyFile->str);
- guint64 outlen = 0;
+ gsize outlen = 0;
int buflen = KEY_LENGTH + CMAC_LENGTH + sizeof(guint64);
|