diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2021-06-07 08:59:02 +0200 |
---|---|---|
committer | Stig Bjørlykke <stig@bjorlykke.org> | 2021-06-07 08:59:02 +0200 |
commit | 68e360bf0404e5b5246281ed3ea289907320dd76 (patch) | |
tree | 1a450599efb47922b08e211c9bb582f1312aade4 /ui/qt/main_window_slots.cpp | |
parent | 5dbaa8d3b28cf32a103408868fa4cf5b63dd6a56 (diff) |
ui: Return length from ssl_export_sessions()
All users of ssl_export_sessions() calculates the length of the
returned string, so let's return the length instead.
Diffstat (limited to 'ui/qt/main_window_slots.cpp')
-rw-r--r-- | ui/qt/main_window_slots.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ui/qt/main_window_slots.cpp b/ui/qt/main_window_slots.cpp index f1cf8b7ab2..1c6d945808 100644 --- a/ui/qt/main_window_slots.cpp +++ b/ui/qt/main_window_slots.cpp @@ -1856,8 +1856,9 @@ void MainWindow::on_actionFileExportTLSSessionKeys_triggered() tr("TLS Session Keys (*.keys *.txt);;All Files (" ALL_FILES_WILDCARD ")") ); if (file_name.length() > 0) { - gchar *keylist = ssl_export_sessions(); - write_file_binary_mode(qUtf8Printable(file_name), keylist, strlen(keylist)); + gsize keylist_length; + gchar *keylist = ssl_export_sessions(&keylist_length); + write_file_binary_mode(qUtf8Printable(file_name), keylist, keylist_length); /* Save the directory name for future file dialogs. */ wsApp->setLastOpenDir(file_name); |