From d2efc101692608a4da44082fab26f49cdc6b4d84 Mon Sep 17 00:00:00 2001 From: hubnut Date: Sun, 11 Feb 2024 13:00:01 -0800 Subject: [PATCH] Remove extraneous NULs after newlines in exported FreeOTP files --- src/common/freeotp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/freeotp.c b/src/common/freeotp.c index 188afad..2cc671b 100644 --- a/src/common/freeotp.c +++ b/src/common/freeotp.c @@ -45,7 +45,7 @@ export_freeotpplus (const gchar *export_path, if (err == NULL) { json_array_foreach (json_db_data, index, db_obj) { gchar *uri = get_otpauth_uri (NULL, db_obj); - if (g_output_stream_write (G_OUTPUT_STREAM(out_stream), uri, g_utf8_strlen (uri, -1) + 1, NULL, &err) == -1) { + if (g_output_stream_write (G_OUTPUT_STREAM(out_stream), uri, g_utf8_strlen (uri, -1), NULL, &err) == -1) { g_set_error (&err, generic_error_gquark (), GENERIC_ERRCODE, "couldn't dump json data to file"); } g_free (uri);