Plan 9 from Bell Labs’s /usr/web/sources/contrib/mospak/webfs-readline-overflow/webfs-readline-overflow.diff

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


--- sys/src/cmd/webfs/buf.c
+++ sys/src/cmd/webfs/buf.c
@@ -57,6 +57,7 @@

 	for(p = buf;;){
 		if(b->rp >= b->wp){
+			b->rp = b->wp = b->buf;
 			n = ioread(b->io, b->fd, b->wp, sizeof(b->buf)/2);
 			if(n < 0)
 				return -1;

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.