Skip to content

Commit

Permalink
Merge pull request #345 from hubnut/fix-freeotp-export-nuls
Browse files Browse the repository at this point in the history
Remove extraneous NULs after newlines in exported FreeOTP files
  • Loading branch information
paolostivanin committed Feb 12, 2024
2 parents 81b2de8 + d2efc10 commit 75684d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/common/freeotp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 75684d4

Please sign in to comment.