Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Robert Dubner
OpenLDAP
Commits
0ee21a48
Commit
0ee21a48
authored
Nov 21, 2019
by
Quanah Gibson-Mount
Browse files
Merge remote-tracking branch 'origin/mdb.RE/0.9' into OPENLDAP_REL_ENG_2_4
parents
34c61739
7d0c4b4c
Changes
4
Hide whitespace changes
Inline
Side-by-side
libraries/liblmdb/CHANGES
View file @
0ee21a48
LMDB 0.9 Change Log
LMDB 0.9.25 Engineering
ITS#9068 fix mdb_dump/load backslashes in printable content
ITS#9118 add MAP_NOSYNC for FreeBSD
LMDB 0.9.24 Release (2019/07/24)
ITS#8969 Tweak mdb_page_split
ITS#8975 WIN32 fix writemap set_mapsize crash
...
...
libraries/liblmdb/mdb.c
View file @
0ee21a48
...
...
@@ -4010,13 +4010,18 @@ mdb_env_map(MDB_env *env, void *addr)
if
(
rc
)
return
rc
;
#else
int
mmap_flags
=
MAP_SHARED
:
int
prot
=
PROT_READ
;
#ifdef MAP_NOSYNC
/* Used on FreeBSD */
if
(
flags
&
MDB_NOSYNC
)
mmap_flags
|=
MAP_NOSYNC
;
#endif
if
(
flags
&
MDB_WRITEMAP
)
{
prot
|=
PROT_WRITE
;
if
(
ftruncate
(
env
->
me_fd
,
env
->
me_mapsize
)
<
0
)
return
ErrCode
();
}
env
->
me_map
=
mmap
(
addr
,
env
->
me_mapsize
,
prot
,
MAP_SHARED
,
env
->
me_map
=
mmap
(
addr
,
env
->
me_mapsize
,
prot
,
mmap_flags
,
env
->
me_fd
,
0
);
if
(
env
->
me_map
==
MAP_FAILED
)
{
env
->
me_map
=
NULL
;
...
...
libraries/liblmdb/mdb_dump.c
View file @
0ee21a48
...
...
@@ -68,6 +68,8 @@ static void text(MDB_val *v)
end
=
c
+
v
->
mv_size
;
while
(
c
<
end
)
{
if
(
isprint
(
*
c
))
{
if
(
*
c
==
'\\'
)
putchar
(
'\\'
);
putchar
(
*
c
);
}
else
{
putchar
(
'\\'
);
...
...
libraries/liblmdb/mdb_load.c
View file @
0ee21a48
...
...
@@ -238,7 +238,7 @@ badend:
while
(
c2
<
end
)
{
if
(
*
c2
==
'\\'
)
{
if
(
c2
[
1
]
==
'\\'
)
{
c1
++
;
c2
+=
2
;
*
c1
++
=
*
c
2
;
}
else
{
if
(
c2
+
3
>
end
||
!
isxdigit
(
c2
[
1
])
||
!
isxdigit
(
c2
[
2
]))
{
Eof
=
1
;
...
...
@@ -246,8 +246,8 @@ badend:
return
EOF
;
}
*
c1
++
=
unhex
(
++
c2
);
c2
+=
2
;
}
c2
+=
2
;
}
else
{
/* copies are redundant when no escapes were used */
*
c1
++
=
*
c2
++
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment