This should resolve the crash indicated in issue 44:

http://code.swtch.com/plan9port/issue/44/sam-crash

R=rsc
CC=codebot
http://codereview.appspot.com/207094
This commit is contained in:
Eoghan Sherry 2010-02-18 22:32:37 -08:00 committed by Russ Cox
parent 9a05452085
commit 93ee60c369
2 changed files with 3 additions and 1 deletions

View file

@ -653,7 +653,7 @@ hsetsnarf(int nc)
if(n >= 0){
if(!s1)
n = 0;
if(n > 65535){
if(n > SNARFSIZE){
s1 = strdup("<snarf too long>");
if (!s1)
panic("strdup");