Commit Graph

1384 Commits

Author SHA1 Message Date
Evan Miller
b81b1c9271 Version 1.0.1
Some checks failed
build / linux (clang, enable-glib, disable-iconv) (push) Has been cancelled
build / linux (clang, enable-glib, enable-iconv) (push) Has been cancelled
build / linux (gcc, disable-glib, disable-iconv) (push) Has been cancelled
build / linux (gcc, disable-glib, enable-iconv) (push) Has been cancelled
build / linux (gcc, enable-glib, disable-iconv) (push) Has been cancelled
build / linux (gcc, enable-glib, enable-iconv) (push) Has been cancelled
build / linux (gcc-10, disable-glib, disable-iconv) (push) Has been cancelled
build / linux (gcc-10, disable-glib, enable-iconv) (push) Has been cancelled
build / linux (gcc-10, enable-glib, disable-iconv) (push) Has been cancelled
build / linux (gcc-10, enable-glib, enable-iconv) (push) Has been cancelled
build / linux (gcc-9, disable-glib, disable-iconv) (push) Has been cancelled
build / linux (gcc-9, disable-glib, enable-iconv) (push) Has been cancelled
build / linux (gcc-9, enable-glib, disable-iconv) (push) Has been cancelled
build / linux (gcc-9, enable-glib, enable-iconv) (push) Has been cancelled
build / macos (clang, disable-glib, disable-iconv) (push) Has been cancelled
build / macos (clang, disable-glib, enable-iconv) (push) Has been cancelled
build / macos (clang, enable-glib, disable-iconv) (push) Has been cancelled
build / macos (clang, enable-glib, enable-iconv) (push) Has been cancelled
build / macos (gcc, disable-glib, disable-iconv) (push) Has been cancelled
build / macos (gcc, disable-glib, enable-iconv) (push) Has been cancelled
build / macos (gcc, enable-glib, disable-iconv) (push) Has been cancelled
build / macos (gcc, enable-glib, enable-iconv) (push) Has been cancelled
build / macos-iodbc (clang, disable-glib) (push) Has been cancelled
build / macos-iodbc (clang, enable-glib) (push) Has been cancelled
build / macos-iodbc (gcc, disable-glib) (push) Has been cancelled
build / macos-iodbc (gcc, enable-glib) (push) Has been cancelled
build / windows (disable-glib, disable-iconv) (push) Has been cancelled
build / windows (disable-glib, enable-iconv) (push) Has been cancelled
build / windows (enable-glib, disable-iconv) (push) Has been cancelled
build / windows (enable-glib, enable-iconv) (push) Has been cancelled
2024-12-26 07:28:56 -05:00
Evan Miller
c5d4d1d4ee Fix txt2man path 2024-12-26 07:27:34 -05:00
Evan Miller
7625bfaebf Build fixes 2024-12-26 06:33:37 -05:00
Yuhang Ji
4c4ff13237
Update HACKING.md (#439)
Add the missing `& offset_mask` to `offset_stop of memo`
2024-07-04 10:19:57 -04:00
Evan Miller
2b2ef525c8 Fix another brew path on macos CI 2024-05-14 16:09:10 -04:00
Evan Miller
3a954c00d4 Fix brew paths on macos CI 2024-05-14 16:01:41 -04:00
Evan Miller
98d17badc6 Install unixodbc on macos CI 2024-05-14 14:24:51 -04:00
Evan Miller
997f4ec846 Install libtool on macos CI 2024-05-14 14:20:16 -04:00
bstoeger
f517db5df0
Move includes out of extern "C" block (#435)
"mbdtools.h" couldn't be included from C++ files, because the "glib.h"
include is in the extern "C" block. The latter includes C++ headers
for C++ source files, which define templates. These don't work with
extern "C" linkage and the compilation falls apart with numerous
errors.

To fix this problem, move the includes out of the extern "C" block.
2024-05-13 09:12:45 -04:00
Akkana Peck
7e057e3197
Fix a minor error in the mdb-json man page (#427) 2024-02-17 13:18:12 -05:00
Michele Locati
bb83142d47
Make test_script.sh less verbose (configurable) (#424) 2023-10-10 08:18:52 -04:00
Benjamin Holstein
bf77523c1d
Add support for SQLGetData converting floating point types (#422) 2023-10-06 18:31:26 -04:00
Michele Locati
c423097326
Fix invalid byte sequence error when running test_script.sh in some cases (#423)
This fixes the following error that may occur:
argument parsing failed: Invalid byte sequence in conversion input
2023-10-06 17:00:07 -04:00
Evan Miller
57d9e7a65e
Fix iodbc path on macos GH action (#421) 2023-09-10 14:16:02 -04:00
Elio Blanca
6640f9c707
fix use after free (#419) 2023-09-03 20:54:22 -04:00
Mladen Milinkovic
328249a628
Fixed truncating 64bit (SQL_NULL_DATA) values (#416) 2023-07-06 06:47:10 -04:00
Cédric Luthi
0d67eb4c73
Fix ODBC_LIBS for unixODBC (#415)
Using `$libdir` doesn't work and produces an error when configuring with ` ./configure --with-unixodbc=$(brew --prefix)`

> configure:21209: gcc -o conftest -g -O2 -Wall -Werror   -L/opt/homebrew/${exec_prefix}/lib conftest.c -lodbcinst   >&5
> ld: warning: directory not found for option '-L/opt/homebrew/${exec_prefix}/lib'
> ld: library not found for -lodbcinst
> clang: error: linker command failed with exit code 1 (use -v to see invocation)

Note that `warning: directory not found for option '-L/.../${exec_prefix}/lib'` is always emitted but if unixodbc is installed in `/usr/local/lib` linking would still work.
2023-07-04 14:56:41 -04:00
Cédric Luthi
633d1c091f
Make DSN and DBQ extraction from connection string case insensitive (#414) 2023-07-03 15:34:02 -04:00
drf5n
1097a48b80
Update README.md to remove INSTALL reference (#407)
Per https://github.com/mdbtools/mdbtools/issues/406#issuecomment-1463541923
2023-05-17 07:10:43 -04:00
Evan Miller
d9025dbf22 Two more code pages 2023-04-27 20:36:22 -04:00
Marco Manfredini
0e77b68e76
Add index and primary key output to the sqlite schema writer backend. (#402) 2023-02-02 05:36:22 -05:00
Evan Miller
9aa68a6ba1 Fix macos-iodbc CI build 2023-02-02 05:35:21 -05:00
Evan Miller
f7ae5e3f3c
Require glib2 2.68 or later (for g_memdup2) (#400) 2022-12-17 07:08:44 -05:00
Evan Miller
f14fbea093 Fix C89 errors 2022-12-17 05:41:45 -05:00
Evan Miller
d54f7b669f update gitignore 2022-12-17 05:36:26 -05:00
Evan Miller
0b96ecaff1
Fix windows GH action (#399) 2022-12-17 05:33:40 -05:00
Evan Miller
9e1ec2a588
Merge pull request #394 from h3xx/fix-bash-completion
Fix wrongly installed mdb-sql completion script
2022-08-26 08:26:57 -04:00
Dan Church
ff544c0b76
Fix wrongly installed mdb-sql completion script
Gate it behind the same conditional that the `mdb-sql` program is gated
behind.
2022-08-24 16:34:11 -05:00
Evan Miller
ab5beff0fa
Merge pull request #381 from schaanie17/dev
Changed mapping of MDB_DOUBLE for MySQL from float to double
2022-03-08 12:14:46 -08:00
Jan Langer
22af793623 Changed mapping of MDB_DOUBLE for MySQL from float to double 2022-03-08 19:18:08 +01:00
Evan Miller
ff085816b2
Merge pull request #377 from jwrdegoede/oss-fuzz-35972-null-ptr-deref-fix
Always check mdb_read_table() return value
2022-01-25 10:46:43 -05:00
Hans de Goede
03391fc913 Always check mdb_read_table() return value
A couple of places were missing NULL return value checks for
mdb_read_table()'s return value. Add these.

This fixes a NULL pointer deref while running ./test_script.sh
on the test mdb file from oss-fuzz/35972 .

Note this does NOT fix the original problem reported in oss-fuzz/35972
which reports a "Dynamic-stack-buffer-overflow WRITE 16" issue,
which I've been unable to reproduce.
2022-01-25 16:35:28 +01:00
Evan Miller
2da65ffdb3
Merge pull request #376 from jwrdegoede/oss-fuzz-36187-null-ptr-deref-fix
Fix null-ptr deref when table->map_sz is 0
2022-01-25 10:24:14 -05:00
Hans de Goede
4febc7b5c6 Fix null-ptr deref when table->map_sz is 0
The oss-fuzz/36187 attached
clusterfuzz-testcase-minimized-fuzz_mdb-4756071066501120
has a table with a map_sz of 0 and the g_memdup2 call returns NULL for
this, while mdb_map_find_next unconditionally derefs table->usage_map
to read the first byte which contains the map-type.

This leads to a NULL-ptr deref (at least with -fsanitize=address builds),
fix this by rejecting tables with a map_sz of 0.

Note this does NOT fix the original problem reported in oss-fuzz/36187
which reports a "Dynamic-stack-buffer-overflow WRITE 16" issue, which
I've been unable to reproduce.
2022-01-25 15:10:38 +01:00
pedromorgan@gmail.com
bcad261464 remove *.css.map 2021-11-24 10:41:48 -05:00
Evan Miller
ab9e4088a9 Merge branch 'dev' 2021-10-24 09:17:04 -04:00
Evan Miller
1f88aac676 Version 1.0.0 2021-10-24 09:05:19 -04:00
Evan Miller
c3df30837e Fix appveyor build 2021-09-30 09:59:16 -04:00
Christian Ehrhardt
22c379a611 Fix gcc-11 error "directive argument is null"
mdbtools triggered
In function ‘printf’,
    inlined from ‘mdb_dump_catalog’ at catalog.c:195:4:
/usr/include/powerpc64le-linux-gnu/bits/stdio2.h:112:10:
error: ‘%-12s’ directive argument is null [-Werror=format-overflow=]
  112 |   return __printf_chk (__USE_FORTIFY_LEVEL - 1, __fmt, __va_arg_pack ());

This is due to mdb_get_objtype_string potentially returning NULL
which isn't allowed anymore as it would cause a segfault on the latter
print.

Fixes: #352

Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
2021-09-30 08:19:53 -04:00
Evan Miller
5946750058 Version 1.0.0, Beta 7 2021-09-29 15:53:46 -04:00
Evan Miller
5ddad8660b Clarify some bit-shifting casts 2021-09-29 09:20:24 -04:00
Evan Miller
6de0227a36 Fix export of byte field values >127
Regression introduced in v0.9.3-beta1. Fixes #350
2021-09-29 09:16:22 -04:00
Evan Miller
b0a1f00113 Version 1.0.0, Beta 6 2021-09-12 16:00:21 -04:00
Evan Miller
77ee311eec Rearrange some ODBC code
Move unixODBC specific code to its own source file, and support old
iODBC installations that have only iodbinst.h.
2021-09-08 11:07:17 -04:00
Evan Miller
c04a3fb9a7 Merge branch 'dev' of github.com:mdbtools/mdbtools into dev 2021-09-08 10:58:30 -04:00
Evan Miller
ee5834d239 Print deprecation warnings before usage info 2021-09-08 10:50:28 -04:00
Evan Miller
f0d435ecdb Use TLS macro for cross-platform thread-local storage 2021-09-08 09:09:03 -04:00
Evan Miller
c137d64d13 Improved bounds checking 2021-09-08 06:41:58 -04:00
Evan Miller
4369721363 ODBC: Support SQL_C_WCHAR target type. Fixes #347
Also remove SQLFetchW and SQLGetDataW since they are not documented
in any other ODBC drivers.
2021-09-08 06:15:59 -04:00
Evan Miller
30d55a87ef Version 1.0.0, Beta 5 2021-09-06 15:22:23 -04:00