[Pkg-vala-maintainers] Bug#619503: fix use-after-free in x11.vapi
Alexander Kurtz
kurtz.alex at googlemail.com
Thu Mar 24 15:12:29 UTC 2011
Package: valac-0.10
Version: 0.10.4-1
Severity: normal
Tags: patch
Hi,
This works with Vala 0.10.4:
$ cat test.vala
void main(){
X.Display disp = new X.Display();
stdout.printf("%s\n", disp.display_string());
}
$ valac --pkg=x11 test.vala && ./test
:0.0
$
This doesn't work with Vala 0.10.4:
$ cat test.vala
void main(){
X.Display disp = new X.Display();
stdout.printf("%s\n", disp.display_string());
stdout.printf("%s\n", disp.display_string());
}
$ valac --pkg=x11 test.vala && ./test
:0.0
*** glibc detected *** ./test: double free or corruption (fasttop): 0x08509958 ***
[...]
This patch fixes the issues for me:
--- x11.vapi.orig 2011-03-14 14:07:46.731734844 +0100
+++ x11.vapi 2011-03-14 14:08:04.103728858 +0100
@@ -76,7 +76,7 @@
public unowned Screen screen_by_id (int screen_number);
[CCode (cname = "DisplayString")]
- public string display_string ();
+ public unowned string display_string ();
[CCode (cname = "XQLength")]
public int event_queue_length ();
Best regards
Alexander Kurtz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.alioth.debian.org/pipermail/pkg-vala-maintainers/attachments/20110324/5a6f1520/attachment.pgp>
More information about the Pkg-vala-maintainers
mailing list