Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Kexi
Manage
Activity
Members
Labels
Plan
Issues
143
Issue boards
Milestones
Wiki
Code
Merge requests
2
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Office
Kexi
Commits
410db4e3
Commit
410db4e3
authored
8 years ago
by
Brian Bruns
Committed by
Jarosław Staniek
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Bug fix for 'bad' data with odd number of UCS-2 bytes
BUG:396984 mdbtools 9d56b0c3d80cdabc21b
parent
437231a6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/migration/mdb/3rdparty/mdbtools/libmdb/iconv.c
+7
-0
7 additions, 0 deletions
src/migration/mdb/3rdparty/mdbtools/libmdb/iconv.c
with
7 additions
and
0 deletions
src/migration/mdb/3rdparty/mdbtools/libmdb/iconv.c
+
7
−
0
View file @
410db4e3
...
...
@@ -74,6 +74,13 @@ mdb_unicode2ascii(MdbHandle *mdb, char *src, size_t slen, char *dest, size_t dle
//printf("1 len_in %d len_out %d\n",len_in, len_out);
while
(
1
)
{
iconv
(
mdb
->
iconv_in
,
&
in_ptr
,
&
len_in
,
&
out_ptr
,
&
len_out
);
/*
* Have seen database with odd number of bytes in UCS-2, shouldn't happen but protect against it
*/
if
(
!
IS_JET3
(
mdb
)
&&
len_in
<=
1
)
{
//fprintf(stderr, "Detected invalid number of UCS-2 bytes\n");
break
;
}
if
((
!
len_in
)
||
(
errno
==
E2BIG
))
break
;
/* Don't bail if impossible conversion is encountered */
in_ptr
+=
(
IS_JET3
(
mdb
))
?
1
:
2
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment