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

Re: [leafnode-list] leafnode does not display groups



On Thu, Apr 20, 2000 at 11:13:42AM +0200, david van zeebroeck wrote:
> so now i connect using telnet to the server  a issue a group command to
> go into a group i know my provider has
> i get a message that the group does not exist
> when i look at /var/adm/messages is see folowing error comming form
> leafnode
> leafnode[14610]: Groupinfo file possibly truncated or damaged: 3dfx.d3d

Well, I think I found some bugs the aforementioned snprintf().
I attached an untested patch. I would very much appreciate if you
could give it a try. If it doesn't work you will either have to
have a bit more patience with me or go back a version prior to
1.9.10 (IIRC). 1.9.9 and 1.9.6 should be the best in this set.

Regards,
	Jo:rg

-- 
Fortune cookie of the day:
Four thousand different MAGNATES, MOGULS & NABOBS are romping in my
gothic solarium!!



*** miscutil.c.orig	Sun Apr  9 14:05:11 2000
--- miscutil.c	Fri Apr 21 04:41:56 2000
***************
*** 555,561 ****
   */
  
  int snprintf( char *str, size_t n, const char *format, ... ) {
-     int rval;
      va_list ap;
      const char *p;
      char *q;
--- 555,560 ----
***************
*** 577,583 ****
      	if ( ( *p == '%' )  && !flag ) {
  	    uflag = 0;
  	    flag  = 1;
! 	    *p++;
  	}
  	else if ( flag ) {
  	    switch (*p)  {
--- 576,582 ----
      	if ( ( *p == '%' )  && !flag ) {
  	    uflag = 0;
  	    flag  = 1;
! 	    p++;
  	}
  	else if ( flag ) {
  	    switch (*p)  {
***************
*** 619,628 ****
  			}
  			else {
  			    l = va_arg( ap, long );
! 			    sprintf( buf, "%l", l );
  			}
  		    }
! 		    *p++;
  		    len = strlen(buf);
  		    if ( len > (n-i) )
  			len = n-i;
--- 618,627 ----
  			}
  			else {
  			    l = va_arg( ap, long );
! 			    sprintf( buf, "%ld", l );
  			}
  		    }
! 		    p++;
  		    len = strlen(buf);
  		    if ( len > (n-i) )
  			len = n-i;