diff options
author | Richard Jones <rjones@redhat.com> | 2009-04-24 14:31:38 +0100 |
---|---|---|
committer | Richard Jones <rjones@redhat.com> | 2009-04-24 14:31:38 +0100 |
commit | 56826a0dc9533cb1d7d227c5a2f70d8d31a4dd8f (patch) | |
tree | f40158759b30ed238da706956f54f913352dfeeb /ruby/ext | |
parent | ab6f429a5a5ba084bdc948c0c21b2dceeae6298d (diff) | |
download | libguestfs-56826a0dc9533cb1d7d227c5a2f70d8d31a4dd8f.tar.gz libguestfs-56826a0dc9533cb1d7d227c5a2f70d8d31a4dd8f.tar.xz libguestfs-56826a0dc9533cb1d7d227c5a2f70d8d31a4dd8f.zip |
Ruby bindings didn't NULL-terminate an array, resulting in segfault.1.0.12
Diffstat (limited to 'ruby/ext')
-rw-r--r-- | ruby/ext/guestfs/_guestfs.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ruby/ext/guestfs/_guestfs.c b/ruby/ext/guestfs/_guestfs.c index 07b02287..d4b62cad 100644 --- a/ruby/ext/guestfs/_guestfs.c +++ b/ruby/ext/guestfs/_guestfs.c @@ -1418,6 +1418,7 @@ static VALUE ruby_guestfs_vgcreate (VALUE gv, VALUE volgroupv, VALUE physvolsv) VALUE v = rb_ary_entry (physvolsv, i); physvols[i] = StringValueCStr (v); } + physvols[len] = NULL; } int r; @@ -1503,6 +1504,7 @@ static VALUE ruby_guestfs_sfdisk (VALUE gv, VALUE devicev, VALUE cylsv, VALUE he VALUE v = rb_ary_entry (linesv, i); lines[i] = StringValueCStr (v); } + lines[len] = NULL; } int r; @@ -1659,6 +1661,7 @@ static VALUE ruby_guestfs_command (VALUE gv, VALUE argumentsv) VALUE v = rb_ary_entry (argumentsv, i); arguments[i] = StringValueCStr (v); } + arguments[len] = NULL; } char *r; @@ -1688,6 +1691,7 @@ static VALUE ruby_guestfs_command_lines (VALUE gv, VALUE argumentsv) VALUE v = rb_ary_entry (argumentsv, i); arguments[i] = StringValueCStr (v); } + arguments[len] = NULL; } char **r; @@ -2337,6 +2341,7 @@ static VALUE ruby_guestfs_debug (VALUE gv, VALUE subcmdv, VALUE extraargsv) VALUE v = rb_ary_entry (extraargsv, i); extraargs[i] = StringValueCStr (v); } + extraargs[len] = NULL; } char *r; |