Skip to content
Permalink
Browse files

Merge pull request #5857

e907305 ITS#9068 fix backslash escaping (hyc)
  • Loading branch information...
luigi1111 committed Sep 9, 2019
2 parents d91393d + e907305 commit 93699a27f747cb373ada71e649996fc16e1bee96
Showing with 4 additions and 2 deletions.
  1. +2 −0 external/db_drivers/liblmdb/mdb_dump.c
  2. +2 −2 external/db_drivers/liblmdb/mdb_load.c
@@ -64,6 +64,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('\\');
@@ -236,16 +236,16 @@ static int readline(MDB_val *out, MDB_val *buf)
while (c2 < end) {
if (*c2 == '\\') {
if (c2[1] == '\\') {
c1++; c2 += 2;
*c1++ = *c2;
} else {
if (c2+3 > end || !isxdigit(c2[1]) || !isxdigit(c2[2])) {
Eof = 1;
badend();
return EOF;
}
*c1++ = unhex(++c2);
c2 += 2;
}
c2 += 2;
} else {
/* copies are redundant when no escapes were used */
*c1++ = *c2++;

0 comments on commit 93699a2

Please sign in to comment.
You can’t perform that action at this time.