Commit Graph

28 Commits

Author SHA1 Message Date
Evan Miller
fb6637c503
Fix unused but set variable warning (#221)
Refactor mdb_unicode2ascii to eliminate warnings
2020-12-19 09:37: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
90ee7bfcb5 Remove references to dmalloc
There are more modern tools for memory debugging, get rid of DMALLOC
crap in the source code.

I've left one reference in backend.c to prevent a merge conflict but
this can be removed later.
2020-08-20 08:59:08 -04:00
Nyall Dawson
6085a89e1d Use ICONV_CONST 2020-08-13 12:42:32 +10:00
Nyall Dawson
1846fab4e6 Const correctness on src char pointers for unicode/ascii conversion 2020-08-13 12:12:52 +10:00
Evan Miller
36ba51db7a More Windows fixes 2020-08-05 00:45:14 -04:00
Evan Miller
5cad353bac Fix unused but set variable warning 2020-08-04 18:04:08 -04:00
Brian Bruns
9d56b0c3d8 bug fix for 'bad' data with odd number of UCS-2 bytes 2016-08-30 08:52:32 -04: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
Jean-Michel Vourgère
c566407eaf Experimental support for JET5 .accdb files
Right now, they are handled like JET4 file.
2012-07-03 00:31:23 +02:00
Nirgal Vourgre
dd0f4c3819 Patch docs.diff from Nirgal 2011-08-28 19:53:29 -04:00
Brian Bruns
39277312d4 patch 'schema2' from Nirgal Vourgère 2011-02-16 18:58:22 -05:00
Brian Bruns
ae9fe1f304 patch from Brett Hutley posted 2008-07-24. Bounds check binding of memo field in JET3 when not using iconv. 2010-06-16 22:37:31 -04:00
brianb
a443e83ae7 Clean up for 0.6 release and some bug fixes 2005-09-07 23:27:43 +00:00
whydoubt
c6300ecf16 Use size_t instead of unsigned int for calling iconv 2005-08-05 15:52:16 +00:00
whydoubt
160418635d Clean up some gcc4 warnings 2005-05-02 12:46:33 +00:00
whydoubt
e0cb6caa73 Clean up some gcc4 warnings and errors 2005-04-29 03:08:12 +00:00
whydoubt
f33a9564d1 Changes for compiling in MSVC (Martin Ellis) 2005-03-13 05:26:38 +00:00
whydoubt
07c9d00283 Fix some issues with mdb_memo_to_string 2005-03-12 03:33:17 +00:00
whydoubt
d271b5fae5 Better compressed text handling 2004-12-11 06:07:20 +00:00
brianb
fa8d24dd2b patch from Wind Li for iconv on jet3.
Small changes from me for writing.
2004-12-01 23:31:48 +00:00
whydoubt
fd550a5f52 Clean up some memory leaks 2004-12-01 06:34:27 +00:00
brianb
34a9eac4ea iconv conversion code 2004-11-26 05:22:52 +00:00
whydoubt
84f4d7b812 Tighten packing of strings into rows 2004-08-25 02:15:06 +00:00
whydoubt
40f3afdbb7 Fixes based on 'gcc -W -Wall' warnings 2004-07-03 04:56:07 +00:00
brianb
9813d08844 fix bug #903498 2004-03-06 23:59:54 +00:00
brianb
66f4ea4ae6 new file for unicode convert 2004-03-06 05:14:39 +00:00