Nirgal Vourgère
6ef7da0597
Disabled schema comments for mysql backend
...
They were using an incorrect syntax
2013-06-29 12:13:09 +02:00
Nirgal Vourgère
6938e3c128
Changed the gmdb warning when SQL is disabled
...
--enable-sql option is no more.
2013-06-28 20:15:39 +02:00
Nirgal Vourgère
7a1637982c
Fix build if yacc is missing
2013-06-28 20:07:44 +02:00
Nirgal Vourgère
8f0f167ab2
Memory leak fix
...
Free temporary variable in mdb_print_indexes
2013-06-28 17:54:30 +02:00
Nirgal Vourgère
687eeebe78
Memory leak fix
...
Need to free previous backend name when changing it.
2013-06-28 16:41:29 +02:00
Nirgal Vourgère
0196d34d7b
__attribute__ change into macro
...
Makes it easier to port to another compiler.
Thanks Jimmy Taker
2013-06-28 01:51:52 +02:00
Nirgal Vourgère
365f7959ed
Fixed password decoding
...
Thanks Jimmy Taker compilation warning.
2013-06-27 23:46:46 +02:00
William Rogers
0bbe5d3ee6
Memory leak fix
...
Free the col->sargs
2013-06-27 20:58:43 +02:00
William Rogers
1d39126de6
Memory leak wrong fix
...
Free col->sargs
Note this patch causes SEGV
2013-06-27 16:09:53 +02:00
Nirgal Vourgère
a69281e7bf
Fix memory leak
...
Free sql->cur-table->sargs_tree
Thanks William Rogers.
2013-06-27 13:09:53 +02:00
Nirgal Vourgère
577abe09bf
Code factorisation
...
Call mdb_sql_reset from mdb_sql_exit
This does some harmless extra stuff, like reseting column counts.
Not worth the trouble to code it twice.
2013-06-27 12:28:26 +02:00
William Rogers
04daf7cab5
Memory leak fix
...
Need to free parent in mdb_sql_free_tree
2013-06-27 11:13:39 +02:00
Nirgal Vourgère
37cd3ecd2c
Fix SEGV if mdb-array is given a bad filename
...
See bug repport at:
http://www.forallsecure.com/bug-reports/d256a6f86b05b4ca0a1d7097b64e7c6bcd98de6d/
2013-06-26 21:08:24 +02:00
William Rogers
ecc72f8faf
mdb_sql_bind_all already in mdb_sql_run_query
2013-06-26 12:13:44 +02:00
William Rogers
6043e22a43
Memory leak fix in odbc
...
Free the stmt->bind_head list on Stmt
Reset row_affected on FreeStmt
2013-06-26 11:33:26 +02:00
William Rogers
6326e54e82
Fix mem leak in SQLGetData
...
Free temporary string when we are past result length and we return SQL_NO_DATA
2013-06-26 10:13:05 +02:00
Nirgal Vourgère
ee1978161c
Check outpout buffers in ODBC SQLGetInfo
2013-06-26 00:41:12 +02:00
William Rogers
fd6e52f9bd
Fixed MDBProps memory leaks
2013-06-25 21:33:38 +02:00
William Rogers
23942c19d3
Update _SQLGetData - Was incorrectly attempting to validate input of an output only parameter
...
According to the spec, pcbValue is designated as an output only variable, so there is no need to validate any incoming values.
Some packages do not initialize this variable before passing it into the function call; this will randomly result in an improperly thrown error.
Removed the input validation.
2013-06-23 18:28:43 +02:00
tyzhaoqi
9cd05ffdcc
Added missing break in switch/case
...
That missing break is not just a memory leak:
It results in incorrect call to mdb_unicode2ascii for binary data!
I suspect that is what is causing segfault on some db as repported on
https://github.com/brianb/mdbtools/issues/19
2013-06-23 17:56:53 +02:00
rogerswb
40d1ecd11f
Update _SQLGetData - Was incorrectly attempting to validate input of an output only parameter
...
According to the spec, pcbValue is designated as an output only variable, so there is no need to validate any incoming values.
Some packages do not initialize this variable before passing it into the function call; this will randomly result in an improperly thrown error.
Removed the input validation.
2013-05-23 14:58:19 -05:00
Jimmytaker
46005ae009
MDB_DEPRECATED redefined, Constructor MACRO, generate_table_schema changed to not static, date_fmt to ISODate
...
__attribute__ does not exist in Visual Studio. Therefore replaced wherever it appeared with a macro:
Redefines MDB_DEPRECATED to support Visual Studio
Define a Constructor MACRO so that __attribute__((constructor/destructor)) behavior is achieved in Visual Studio.
Just using generate_table_schema through mdb_print_schema deletes the purpose of a very good tool. generate_table_schemas is a rewrite of generate_table_schema but sends the data to a char* instead of FILE*. There is NO fmemopen() or similar in Visual Studio, so there is NO way to access memory through a FILE* except for first writing to the disk and then reading from the disk in memory.
I cannot suggest how to handle the case when td == 0 for the dates. The databases I work with often have just 00:00:00 in the DateTime column which is not consistent with the rest of the column either, but I have to deal with it somehow.
Leaving void* where char* is needed as a function parameter returns a compilation error in Visual Studio.
2013-01-14 19:27:53 +01:00
Nirgal Vourgère
a972c1638d
merge with master
2013-01-14 14:20:10 +01:00
Jimmytaker
cf7980923e
gitignore update
2013-01-14 11:03:16 +01:00
Nirgal Vourgère
eeadcb54f3
Use macros for depreacated function attributes
...
This will help porting on compilers that don't support it
2013-01-13 23:50:42 +01: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 Vourgère
5eeb5c5050
Show SQLite support in gmdb2 and manual.
2013-01-13 22:41:10 +01:00
Jimmytaker
70c6fb7551
Added support for sqlite
2013-01-13 22:32:31 +01:00
Nirgal Vourgère
8a545120d7
Migrate mdb-export changes to gmdb2
...
Support for octal/stip of binary
Customisation of escape string
Quoting is done according to types rather that empiric analysis of str
conversion.
2013-01-13 21:20:00 +01:00
Jimmytaker
9d81bdde56
t
2012-12-31 21:30:35 +01:00
Jimmytaker
6df0aa6ce0
Port to Windows and SQLite Extension
2012-12-31 20:40:12 +01:00
Nirgal Vourgère
7e8ae9b121
print_col new FILE* outfile parameter
...
TODO: Merge that code with the one in gmdb2
2012-12-09 13:10:09 +01:00
Nirgal Vourgère
915eeb61d4
mdb-export -b octal: Encode \0 too
2012-12-03 15:35:14 +01:00
Nirgal Vourgère
a66531c74a
Added option to choose how to export blobs
...
Supported modes are:
- strip (don't export)
- raw (compatibility)
- octal (export as \ooo)
Note that gmdb2 dialog where updated, but not the code. Many fixes to do
there first :/
2012-12-02 20:52:21 +01:00
Nirgal Vourgère
473d820239
Replace map files by -export-symbols-regex use
...
We had to support -export-symbols-regex anways
And map file did not really support versions but only list which symbol
to export. So this is more simple.
2012-10-20 14:32:32 +02:00
Nirgal Vourgère
c7bbac2cab
Tweak odbc calls
...
Removed obsolete FAR from code
SQLfunction calls _SQLfunction rather than the reverse: This avoids
deprecated warning on MacOSX.
2012-10-20 14:22:59 +02:00
Nirgal Vourgère
052bb94361
Fixed some odbc prototypes
...
And also a bunch of warnings
2012-10-12 15:21:59 +02:00
Nirgal Vourgère
bd9091ce57
Backup --version-script with -export-symbols-regex
...
When ld doesn't support --version-script, use -export-symbols-regex
instead.
2012-10-12 14:33:36 +02:00
Nirgal Vourgère
ea9a4ef1e5
Drop support for SunOS style --version-script
...
Not working, and causes compilation problems on MacOS
2012-10-12 13:30:10 +02:00
Nirgal Vourgère
396992f6e1
configure: Quote AC_LANG_PROGRAM for autoconf 2.68
...
Avoid warning in recent autoconf versions. See
http://www.flameeyes.eu/autotools-mythbuster/forwardporting/autoconf.html
2012-10-11 20:32:41 +02:00
Nirgal Vourgère
cca7001f98
Added support for SunOS style --version-script
2012-10-10 18:27:52 +02:00
Nirgal Vourgère
55c52b92bb
Improved man page headers
...
. Fixed titles
. Added version to project name
. Added volume name
2012-10-10 18:26:23 +02:00
Nirgal Vourgère
d0e7eb7d8d
Disable ODBC wide char if iconv is not available
2012-10-10 14:27:30 +02:00
Nirgal Vourgère
a13e268ee2
New configure option --disable-as-needed
...
Some linkers don't support that option
2012-10-05 15:26:37 +02:00
Nirgal Vourgère
195a818064
Added documentation about need of txt2man
...
You need that for the man pages.
2012-10-05 13:55:20 +02:00
Nirgal Vourgère
851877c86c
Changed printf specifier for off_t
...
Fixes some warnings on OSX
2012-10-04 15:37:30 +02:00
Nirgal Vourgère
6b6e54bd14
Disable ld --version-script flag if not supported
...
See https://github.com/brianb/mdbtools/issues/17
Thanks libjpeg-turbo for the script (BSD license)
2012-10-04 14:31:14 +02:00
Nirgal Vourgère
23cab28913
Documentation how to generate the docbook html
2012-10-04 13:04:22 +02:00
Nirgal Vourgère
e3c9fc01e4
Added note about ldconfig need after make install
...
See https://github.com/brianb/mdbtools/issues/7
2012-08-09 16:19:57 +02:00
nirgal
b4b1879e12
Typo in README
2012-08-09 15:07:45 +02:00