[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Fwd] Bug in nam-1.0a8-current [Jun-16]




Thanks for your report. The bug has been fixed now.

Satish


> Hi,
> 
> As always, I saw too late that there is a mailing list for reporting
> bugs... 
> 
> Ciao,
> /J"org
> 
> ----------------------------
> Hi!
> 
> Looking a little into the nam tracefile parser (trace.cc), I found a
> strange part in the function Trace::packetscan (line 464pp):
> 
> ------------ snip-snip
>       case 'c':
> 	/*conversation*/
> 	{
> 	  char *tmp;
> 	  check++;
> 	  strncpy(pe->pkt.convid, value, CONVLEN);
> 	  tmp=strchr(pe->pkt.convid, ' ');
> 	  if (tmp==NULL)
> 	    tmp=strchr(pe->pkt.convid, '\n');
> 	  if ((tmp!=NULL)&&(tmp-pe->pkt.convid<=CONVLEN))
> 	    *tmp='\0';
> 	  str+=strlen(pe->pkt.convid)+2;
> 	  break;
> 	}
>       case 'p':
> 	/*packet type*/
> 	{
> 	  char *tmp;
> 	  strncpy(pe->pkt.type, value, PTYPELEN);
> 	  tmp=strchr(pe->pkt.type, ' ');
> 	  if (tmp==NULL)
> 	    tmp=strchr(pe->pkt.type, '\n');
> 	  if ((tmp!=NULL)&&(tmp-pe->pkt.type<=PTYPELEN))
> 	    *tmp='\0';
> 	  str+=strlen(pe->pkt.convid)+2;
> ------------------------------^^^^^^
> 	  break;
> 	}
> /----------- snip-snip
> 
> It seems to me that the marked line should look like the following,
> meaning that possibly someone forgot to modify it after copy+paste it...
> 
> 	  str+=strlen(pe->pkt.type)+2;
> ------------------------------^^^^
> 
> /J"org
> 
> -----
> J"org Diederich
> Institute of Operating Systems and Computer Networks, 
> Technical University Braunschweig, Germany
> e-mail: [email protected]