This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch master in repository libx2goclient. from 6c8255e src/x2goclient-network-ssh.{c,h}: implement x2goclient_network_ssh_fetch_openssh_version (). new 34afcd7 src/x2goclient-openssh-version.c: only search within the first line. new a0e625a src/x2goclient-openssh-version.c: rework copy function, no functional change. new 48730d9 src/x2goclient-openssh-version.c: use g_slice_free for slice allocator memory. The 3 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: src/x2goclient-openssh-version.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/libx2goclient.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository libx2goclient. commit 34afcd712b6f1c57764384023e67522afdcd551a Author: Mihai Moldovan <ionic@ionic.de> Date: Fri May 15 23:32:17 2020 +0200 src/x2goclient-openssh-version.c: only search within the first line. --- src/x2goclient-openssh-version.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/x2goclient-openssh-version.c b/src/x2goclient-openssh-version.c index 7f4479a..92cb853 100644 --- a/src/x2goclient-openssh-version.c +++ b/src/x2goclient-openssh-version.c @@ -131,13 +131,23 @@ _Bool x2goclient_openssh_version_parse (X2GoClientOpenSSHVersion *openssh_versio X2GoClientOpenSSHVersion *struct_work_copy = x2goclient_openssh_version_copy (openssh_version); + const gchar *newline = NULL; + gchar *version_string_work = NULL; + if (newline = g_strstr_len (version_string, -1, "\n")) { + g_log (NULL, G_LOG_LEVEL_INFO, "Passed version string contains at least one newline, truncating string to first line."); + version_string_work = g_strndup (version_string, newline - version_string); + } + else { + version_string_work = g_strdup (version_string); + } + /* * We expect the version string to have a more-or-less fixed format, such as: * * OpenSSH_<major>.<minor>p<patch><additional data>[,<whitespace><end of line>] */ /* Start with the fixed preamble. */ - const gchar *tmp = version_string; + const gchar *tmp = version_string_work; if (!(g_str_has_prefix (tmp, "OpenSSH_"))) { g_set_error_literal (gerr, ERROR_QUARK, X2GOCLIENT_OPENSSH_VERSION_ERROR_INVALID_PREAMBLE, "Preamble in version string does not match expected value 'OpenSSH_'."); @@ -347,5 +357,8 @@ _Bool x2goclient_openssh_version_parse (X2GoClientOpenSSHVersion *openssh_versio x2goclient_openssh_version_free (struct_work_copy); struct_work_copy = NULL; + g_free (version_string_work); + version_string_work = NULL; + return (ret); } -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/libx2goclient.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository libx2goclient. commit a0e625a1aff641c415f29ad7961bbbc919254464 Author: Mihai Moldovan <ionic@ionic.de> Date: Fri May 15 23:59:14 2020 +0200 src/x2goclient-openssh-version.c: rework copy function, no functional change. --- src/x2goclient-openssh-version.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/x2goclient-openssh-version.c b/src/x2goclient-openssh-version.c index 92cb853..21b6da2 100644 --- a/src/x2goclient-openssh-version.c +++ b/src/x2goclient-openssh-version.c @@ -43,9 +43,11 @@ void x2goclient_openssh_version_free (X2GoClientOpenSSHVersion *openssh_version) } static X2GoClientOpenSSHVersion* x2goclient_openssh_version_copy (X2GoClientOpenSSHVersion *src) { - g_return_val_if_fail (src != NULL, NULL); + X2GoClientOpenSSHVersion *dst = NULL; - X2GoClientOpenSSHVersion *dst = x2goclient_openssh_version_new (); + g_return_val_if_fail (src != NULL, dst); + + dst = x2goclient_openssh_version_new (); *dst = *src; return (dst); -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/libx2goclient.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository libx2goclient. commit 48730d9b0069bfef67348c100d9af75271f5e6cd Author: Mihai Moldovan <ionic@ionic.de> Date: Fri May 15 23:59:41 2020 +0200 src/x2goclient-openssh-version.c: use g_slice_free for slice allocator memory. --- src/x2goclient-openssh-version.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/x2goclient-openssh-version.c b/src/x2goclient-openssh-version.c index 21b6da2..10506e3 100644 --- a/src/x2goclient-openssh-version.c +++ b/src/x2goclient-openssh-version.c @@ -39,7 +39,7 @@ X2GoClientOpenSSHVersion* x2goclient_openssh_version_new (void) { } void x2goclient_openssh_version_free (X2GoClientOpenSSHVersion *openssh_version) { - g_free (openssh_version); + g_slice_free (X2GoClientOpenSSHVersion, openssh_version); } static X2GoClientOpenSSHVersion* x2goclient_openssh_version_copy (X2GoClientOpenSSHVersion *src) { -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/libx2goclient.git