[Bug 307652] Re: editline truncates at 64 characters in batch mode
Mark O'Donohue
mark.odonohue at gmail.com
Sat Dec 13 09:38:58 UTC 2008
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
ubuntu-bugs at lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
More information about the universe-bugs
mailing list