Evan Miller
2be2ab711e
Remove tautological comparison
...
Fixes warnings with some versions of GCC
2021-06-10 09:50:51 -04:00
Evan Miller
31a075e08b
Remove function pointer casts
2021-04-25 11:23:38 -04:00
Benedikt Reinartz
e2b722ed46
Adjust loop callback signatures
...
`GFunc` is `void (gpointer, gpointer)` and `GHFunc` is `void (gpointer, gpointer, gpointer)`,
so the respective callback functions should have the same signature.
2021-04-25 12:47:33 +02:00
Evan Miller
46a65b9789
Fix warning when reading binary properties
...
Also fix some type-size issues in mdb_col_to_string.
See #262
2021-03-07 09:03:39 -05:00
Evan Miller
f1eac042b5
Fix misuse of "%*s" in sprintf strings
...
%*s takes the output length, not the input length. The intended
specifier was %.*s in several places. Bug(s) introduced in
2bb31f05ee
2021-01-21 18:27:20 -05:00
Evan Miller
2bb31f05ee
Improve bounds checking
...
No particular crashes, but replace strcpy / strncpy with snprintf
and GLib functions wherever possible.
2020-12-28 20:12:39 -05:00
Evan Miller
1b96ef4b0d
Clarify mdb_unicode2ascii API and fix buffer overrun ( #220 )
...
There was some confusion as to whether the destination buffer length
should include space for the null terminator. Some callers of the
function assumed that a terminator would be added beyond the end
of the stated buffer size, while others did not. Make everything
consistent and also fix an overrun when there was insufficient
space for the output in the non-iconv implementation.
As stated in a code comment, a better solution would follow the lead
of libxls and use wcstombs and friends when iconv is not available.
But this gets into the weeds with conversion functions named differently
across platforms. The goal here is to fix the buffer overrun.
See oss-fuzz/28773
2020-12-19 08:24:32 -05:00
Evan Miller
7b51824c89
Consolidate / fix UUID formatting
2020-08-19 20:53:35 -04:00
Nyall Dawson
1639283779
Fix int/guint comparison warnings
2020-08-12 13:04:20 +10:00
Evan Miller
2e6e88b96f
Improve bounds and return-value checking
...
Fixes a memory leak and a number of buffer overruns
2020-08-06 15:17:04 -04:00
Evan Miller
bcc6defe94
Merge branch 'master' into no-glib
2020-08-04 23:53:50 -04:00
Evan Miller
446b92b2c8
printf portability fixes
2020-08-04 17:24:04 -04:00
Evan Miller
c7d53108d3
Decode GUID properties
...
Fixes #2
2020-08-04 16:01:25 -04:00
Evan Miller
cb7b694d4b
Merge branch 'master' into no-glib
2020-08-03 18:59:01 -04:00
Evan Miller
68724b2cf2
Fix JET4 warnings brianb/mdbtools#158
2020-08-03 17:34:53 -04:00
Evan Miller
e9f4c6c786
Remove GLib dependency WIP
...
Add a shim implementing half-assed versions of most of the GLib
functions used by MDB Tools. If GLib is detected at compile-time,
use it, otherwise use the shim.
This work is not complete, as the option-parsing code is not yet
implemented - so most of the command-line tools crash.
2020-08-03 17:19:40 -04:00
VJ
c8fd67bf84
Fix more warnings as a result of #14
2019-05-31 21:59:37 -04:00
Nirgal Vourgère
2a70e16a8b
Allow CFLGAS="-std=c99 -D_POSIX_C_SOURCE=2"
...
Use glib function:
strcasecmp -> g_ascii_strcasecmp
bzero -> memset
strdup -> g_strdump
Don't use arithmetic void*+int
2014-12-28 12:36:55 +01:00
Nirgal Vourgère
7841d30d43
Revert use of config.h
...
Revert
7162e8db74
088493d499
And drop AC_CONFIG_HEADERS so that config goes though the command line.
No longer generating config.h, update .gitignore
2013-07-15 02:42:12 +02:00
Nirgal Vourgère
7162e8db74
Include config.h in all .c files
...
Need to be the first file since it may define large files support
and other options.
2013-07-04 10:53:13 +02:00
William Rogers
fd6e52f9bd
Fixed MDBProps memory leaks
2013-06-25 21:33:38 +02:00
Jimmytaker
c9f602480b
Code cleanup
...
Enforce consistency g_malloc - g_free and malloc - free
Move var declarations on top of functions
2013-01-13 23:17:07 +01:00
Nirgal Vourgre
dd0f4c3819
Patch docs.diff from Nirgal
2011-08-28 19:53:29 -04:00
Nirgal Vourgre
1f2749cdfc
Patch bufferdump.diff from Nirgal
2011-08-28 19:43:52 -04:00
Nirgal Vourgre
3e2407044d
Patch prop_abi.diff from Nirgal
2011-08-28 19:42:34 -04:00
Brian Bruns
6696edf1f8
patch 'props' from Nirgal Vourgère
2011-02-16 18:58:02 -05:00
Brian Bruns
3adb7d6bab
clean up for kkd / mdb-props, from Nirgal Vourgère
2011-02-07 22:06:48 -05:00
whydoubt
eb9bba1d10
Alter buffer_dump's third parameter from 'end' to 'length'
2005-07-02 07:16:04 +00:00
whydoubt
937e72c305
Pass malloc'd strings with mdb_col_to_string, et al
2005-02-25 03:27:32 +00:00
whydoubt
1a1127e930
Back out some ineffective NULL setting
2004-04-25 05:31:23 +00:00
whydoubt
382a0fca39
Setting pointers to NULL after freeing
2004-04-24 20:37:13 +00:00
brianb
8592cf5db5
missed added files
2003-05-02 22:20:44 +00:00