[Pkg-privacy-commits] [libgsecuredelete] 07/168: Fixed crash of the run_sync() method.

Ulrike Uhlig u-guest at moszumanska.debian.org
Thu Jul 7 20:06:32 UTC 2016


This is an automated email from the git hooks/post-receive script.

u-guest pushed a commit to branch master
in repository libgsecuredelete.

commit cd78c8d25074916a81683e3851dc7fe75411097c
Author: Colomban Wendling <ban at herbesfolles.org>
Date:   Tue Sep 29 22:00:39 2009 +0200

    Fixed crash of the run_sync() method.
    
    Added a workaround for the lack of check for null-ness of out parameter by
    valac, leading to a crash if the out parameter is null.
    juergbi on irc.gimp.net#vala said it is a planned thing, but still not
    implemented (as of Vala 0.7.7).
---
 gsecuredelete/async-operation.vala | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/gsecuredelete/async-operation.vala b/gsecuredelete/async-operation.vala
index db6633f..e10fb69 100644
--- a/gsecuredelete/async-operation.vala
+++ b/gsecuredelete/async-operation.vala
@@ -260,9 +260,19 @@ namespace SecureDelete
         throw e;
       }
       try {
-        Process.spawn_sync (working_directory, args, this.build_environ (),
-                            spawn_flags, null,
-                            out standard_output, out error_output, out exit_status);
+        /* FIXME: hack the current Vala lack of check for null-ness of out
+         * parameters before using it.
+         * It seems to be a planned thing (as of Vala 0.7.7), as juergbi said on
+         * irc.gimp.net#vala */
+        if (&standard_output != null) {
+          Process.spawn_sync (working_directory, args, this.build_environ (),
+                              spawn_flags, null,
+                              out standard_output, out error_output, out exit_status);
+        } else {
+          Process.spawn_sync (working_directory, args, this.build_environ (),
+                              spawn_flags, null,
+                              null, out error_output, out exit_status);
+        }
       } catch (SpawnError e) {
         success = false;
         throw e;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/libgsecuredelete.git



More information about the Pkg-privacy-commits mailing list