Re: Check an GObject
- From: Emmanuele Bassi <ebassi gmail com>
- To: iri <iri irizone net>
- Cc: "gtk-app-devel-list gnome org" <gtk-app-devel-list gnome org>
- Subject: Re: Check an GObject
- Date: Sun, 16 Jun 2013 16:37:46 +0100
hi;
On 16 June 2013 16:24, iri <iri irizone net> wrote:
I already check myself the received object, by internal methods. But (of
course) i'm not sure that there are not any vulnerabilities.
Know if this object is -or not- a valid GObject instance was the result of
G_IS_OBJECT. Am I wrong ?
G_IS_OBJECT, and all the macros around G_TYPE_CHECK_INSTANCE_TYPE,
assume that you're either passing NULL, or that you're passing a valid
GTypeInstance pointer, as the type system will need to access the
fields of that particular structure. if you pass something that is
*not* a pointer to a GTypeInstance you'll likely either to get a
segmentation fault, or to read some garbage from memory.
ciao,
Emmanuele.
--
W: http://www.emmanuelebassi.name
B: http://blogs.gnome.org/ebassi/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]