girepository: avoid crash when querying nonexistent info
authorPavel Holejsovsky <pavel.holejsovsky@gmail.com>
Sat, 12 May 2012 05:44:57 +0000 (07:44 +0200)
committerPavel Holejsovsky <pavel.holejsovsky@gmail.com>
Sat, 12 May 2012 18:48:55 +0000 (20:48 +0200)
commitd055d35a873be5978d82df3955d859399c2e30d9
treed9cb3ae43fc09d363958ee8712983fab00c6d9d3
parent39fc1013ba84d885272123e954b2aea27d5117cd
girepository: avoid crash when querying nonexistent info

It appears that cmph library can return (n+1) when querying item not
present in its original n-item-sized set.  Adjust code so that it
detects this condition and do not chase stray pointers resulting from
this bogus(?) hash result.

https://bugzilla.gnome.org/show_bug.cgi?id=675939
girepository/gitypelib-internal.h
girepository/gitypelib.c
girepository/gthash-test.c
girepository/gthash.c
tests/repository/gitypelibtest.c