avoid hang with htmlroff (Michael Teichgräber)
This commit is contained in:
parent
a727811a2c
commit
2b03bf696c
1 changed files with 1 additions and 1 deletions
|
|
@ -45,7 +45,7 @@ utf_in(int fd, long *notused, struct convert *out)
|
|||
tot = 0;
|
||||
while((n = read(fd, buf+tot, N-tot)) >= 0){
|
||||
tot += n;
|
||||
for(i=j=0; i<tot-UTFmax || (n==0 && i<tot); ){
|
||||
for(i=j=0; i<=tot-UTFmax || (i<tot && (n==0 || fullrune(buf+i, tot-i))); ){
|
||||
c = our_mbtowc(&l, buf+i, tot-i);
|
||||
if(c == -1){
|
||||
if(squawk)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue