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

@ -5,8 +5,10 @@
Albert Lee <trisk@acm.jhu.edu>
André Günther <Andre.G@gmx.de>
Anthony Sorace <a@9srv.net>
Benjamin Huntsman <BHuntsman@mail2.cu-portland.edu>
Enrique Soriano <enrique.soriano@gmail.com>
Eoghan Sherry <ejsherry@gmail.com>
Fazlul Shahriar <fshahriar@gmail.com>
J.R. Mauro <jrm8005@gmail.com>
Jeff Sickel <jas@corpus-callosum.com>

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");