On Tue, Oct 30, 2007 at 23:04:33 -0400, Ritesh Kumar wrote:
[...]
> I went through the source code and fixed the status input handling code to
> make sure it flushes the input status text only if in encounters a '\n'.
[...]
>                 if(FD_ISSET(STDIN_FILENO, &rd)) {
> -                       switch(r = read(STDIN_FILENO, inputtext, sizeof 
> inputtext - 1)) {
> +                       pos = inputtext[strlen(inputtext)-1] != '\n' ? 
> strlen(inputtext) : 0;
> +                       switch(r = read(STDIN_FILENO, &(inputtext[pos]), 
> sizeof inputtext - 1 - pos)) {
[...]

Hmmz, aren't you trying to calculate strlen() of something undefined
here?

-- 
Vasil Dimov
[EMAIL PROTECTED]        Software Developer @ Oracle/Innobase Oy
[EMAIL PROTECTED]                Committer @ FreeBSD.org
[EMAIL PROTECTED]                    Home @ Sofia, Bulgaria

Attachment: pgpr4itsL2xpO.pgp
Description: PGP signature

Reply via email to