2002-07-18 Chris Demetriou <cgd@broadcom.com>
* read.c (read): Don't assign past end of buffer, fix return value.
This commit is contained in:
parent
dee5139131
commit
3b0f85c0f1
@ -1,3 +1,7 @@
|
|||||||
|
2002-07-18 Chris Demetriou <cgd@broadcom.com>
|
||||||
|
|
||||||
|
* read.c (read): Don't assign past end of buffer, fix return value.
|
||||||
|
|
||||||
2002-07-12 Chris Demetriou <cgd@broadcom.com>
|
2002-07-12 Chris Demetriou <cgd@broadcom.com>
|
||||||
|
|
||||||
* mips/Makefile.in (GENOBJS2): New variable to name other
|
* mips/Makefile.in (GENOBJS2): New variable to name other
|
||||||
|
@ -31,7 +31,7 @@ _DEFUN (read, (fd, buf, nbytes),
|
|||||||
for (i = 0; i < nbytes; i++) {
|
for (i = 0; i < nbytes; i++) {
|
||||||
*(buf + i) = inbyte();
|
*(buf + i) = inbyte();
|
||||||
if ((*(buf + i) == '\n') || (*(buf + i) == '\r')) {
|
if ((*(buf + i) == '\n') || (*(buf + i) == '\r')) {
|
||||||
(*(buf + i + 1)) = 0;
|
i++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user