The buffer in editline.c
STATIC char* read_redirected()
is 64 characters long, when it get to the end of 64 characters it does:
if (p == end) {
size += MEM_INC;
p = line = realloc(line, size);
end = p + size;
}
So 'p' which is where it is writing the next character is set back to
the start of the line, not left at the end. The attached patch, bumps p
to next write position correctly.
if (p == end) {
int lengthSoFar = p - line;
size += MEM_INC;
line = realloc(line, size);
p = line + lengthSoFar;
end = line + size;
}
Cheers - Mark
** Attachment added: "fix for bug, based on debian editline 1.12 base"
http://launchpadlibrarian.net/20399291/editline-fix.patch
--
editline truncates at 64 characters in batch mode
https://bugs.launchpad.net/bugs/307652
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs