Issue 8558 - LMDB mdb_load plain text
Summary: LMDB mdb_load plain text
Status: VERIFIED FIXED
Alias: None
Product: LMDB
Classification: Unclassified
Component: liblmdb (show other issues)
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-06 15:50 UTC by remy.chibois@expandium.com
Modified: 2020-03-12 15:56 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description remy.chibois@expandium.com 2017-01-06 15:50:53 UTC
Full_Name: Remy Chibois
Version: LMDB_0.9+
OS: Debian "Jessie"
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (46.218.8.100)


when loading data into a LMDB database using plain text mode (mdb_load -T),
escaped hexadecimal pairs (such as \09 for a tab character) cause data to be
incorrectly converted.

Replacing mdb_load.c line 251 with "*c1++ = *c2++;"nsnstead of "c1++; c2++;"
fixes the issue (after the first escaped sequence, characters from c2 pointer
need to be copied to c1 pointer in order to properly overwrite escaped
sequence).
Comment 1 Howard Chu 2017-01-06 19:51:01 UTC
remy.chibois@expandium.com wrote:
> Full_Name: Remy Chibois
> Version: LMDB_0.9+
> OS: Debian "Jessie"
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (46.218.8.100)
>
>
> when loading data into a LMDB database using plain text mode (mdb_load -T),
> escaped hexadecimal pairs (such as \09 for a tab character) cause data to be
> incorrectly converted.
>
> Replacing mdb_load.c line 251 with "*c1++ = *c2++;"nsnstead of "c1++; c2++;"
> fixes the issue (after the first escaped sequence, characters from c2 pointer
> need to be copied to c1 pointer in order to properly overwrite escaped
> sequence).
>
>
Thanks, fixed in git.

-- 
   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/

Comment 2 Howard Chu 2017-01-07 17:31:53 UTC
changed notes
changed state Open to Test
moved from Incoming to Software Bugs
Comment 3 OpenLDAP project 2018-02-09 19:00:56 UTC
fixed in mdb.master
fixed in mdb.RE/0.9 (0.9.20)
Comment 4 Quanah Gibson-Mount 2018-02-09 19:00:56 UTC
changed notes
changed state Test to Closed