ref: d80b65ed308ce3e62471f062a83759d2460f123e
parent: ee71827b41c925eb1ad9949c4c2895fa711d72be
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Wed Aug 16 12:31:24 EDT 2023
uhtml: use IOUNIT for transfer block size
--- a/sys/src/cmd/uhtml.c
+++ b/sys/src/cmd/uhtml.c
@@ -3,7 +3,7 @@
#include <ctype.h>
int nbuf;
-char buf[64*1024+1];
+char buf[IOUNIT+1];
char *cset = nil;
char *whitespace = " \t\r\n";
@@ -180,7 +180,7 @@
if(write(1, p, nbuf) != nbuf)
sysfatal("write: %r");
p = buf;
- if((nbuf = read(0, p, sizeof(buf))) < 0)
+ if((nbuf = read(0, p, sizeof(buf)-1)) < 0)
sysfatal("read: %r");
}
close(1);
--
⑨