Ryan Lortie
374cb1bc87
gvdb-reader: robustness improvements
...
Improve the robustness of gvdb-reader in two ways.
First: ensure that the result of gvdb_table_has_value() always agrees
with gvdb_table_get_value(). Those two could disagree in the case that
the value was recorded as existing but pointed to an out-of-bounds
region.
Second: prevent gvdb_table_walk() from getting stuck in finite loops due
to self-referential directories.
2012-07-06 21:42:04 -04:00
Ryan Lortie
ae3d42c60f
gvdb-reader: refuse to open file with small header
...
Clean up the logic for dealing with invalid headers and include the case
where the file is too small to contain a fully-formed header.
2012-07-05 19:24:46 -04:00
Ryan Lortie
4e77b52ad8
gvdb-reader: correct whitespace damage
2012-07-05 19:13:58 -04:00
Alexander Larsson
73acf01618
Support creating a GvdbReader from data
...
This is needed for the glib resource work.
2012-01-13 15:59:56 +01:00
Murray Cumming
d1f6300363
Docs: Changed can not to cannot.
...
This is a backport from the glib commit 30fdc1a799
2012-01-13 09:23:06 +01:00
Ryan Lortie
92652ac791
hashing: always use signed chars
...
Our hashing of non-ASCII strings was undefined due to the fact that
'char' is signed on some platforms, unsigned on others. Always use a
signed char.
Discovered by Alexander Larsson.
https://bugzilla.gnome.org/show_bug.cgi?id=658806
2011-09-12 08:12:44 -04:00
Ryan Lortie
3812559659
Remove unused variable in gvdb-reader
...
As originally committed against dconf by Owen.
Newer GCC flags this.
2011-02-03 17:26:51 -05:00
Ryan Lortie
a2918d6c3e
Fix some harmless sign compare warnings
2011-01-17 15:19:14 -05:00
Ryan Lortie
814c0fcaaf
Pass name_length to walk close function
...
For efficiency and safety. This way we don't need to scan backwards for
the path separator (trusting that we will find it properly).
2010-12-07 01:36:09 -05:00
Ryan Lortie
e5e491c969
Add gvdb_table_get_raw_value() API for GSettings
2010-10-03 23:02:45 -04:00
Ryan Lortie
a35852bda3
Fix reader on big endian
...
Some of the hashtable code was failing to byteswap properly.
2010-10-03 21:10:35 -04:00
Ryan Lortie
d63f199d92
Fix is_valid() API
...
Actually dereference the pointer instead of just checking for NULL
2010-07-18 21:43:18 -04:00
Ryan Lortie
df40747190
Add gvdb_table_is_valid() API
...
Checks that the on-disk file is still valid.
2010-07-18 20:45:37 -04:00
Ryan Lortie
afea703422
Implement byteswapping in the reader
2010-06-10 15:27:46 -04:00
Ryan Lortie
9a8cba9eb5
drop "options" support
2010-06-10 13:34:56 -04:00
Ryan Lortie
5215d4b6d3
Add API for dconf's sake.
2010-04-28 12:39:02 -05:00
Ryan Lortie
daa1a73c75
Add a missing 'static' on internal functions
2010-04-22 15:45:47 -04:00
Ryan Lortie
dc2b43b3e7
Fix logic error for missing options in reader
2010-04-19 10:17:31 -04:00
Ryan Lortie
0fec2048f0
Initial commit
2010-04-15 21:26:34 -04:00