[Nagiosplug-checkins] CVS: nagiosplug/plugins negate.c,1.5,1.5.2.1

Ton Voon tonvoon at users.sourceforge.net
Tue Mar 11 14:35:05 CET 2003


Update of /cvsroot/nagiosplug/nagiosplug/plugins
In directory sc8-pr-cvs1:/tmp/cvs-serv14587

Modified Files:
      Tag: r1_3_0
	negate.c 
Log Message:
Fixed reading too many argv parameters and changed to asprintf


Index: negate.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/negate.c,v
retrieving revision 1.5
retrieving revision 1.5.2.1
diff -C2 -r1.5 -r1.5.2.1
*** negate.c	12 Feb 2003 22:29:43 -0000	1.5
--- negate.c	11 Mar 2003 22:34:11 -0000	1.5.2.1
***************
*** 260,265 ****
  	}
  
! 	command_line = strscpy (command_line, argv[optind]);
! 	for (c = optind+1; c <= argc; c++) {
  		asprintf (&command_line, "%s %s", command_line, argv[c]);
  	}
--- 260,265 ----
  	}
  
! 	asprintf (&command_line, "%s", argv[optind]);
! 	for (c = optind+1; c < argc; c++) {
  		asprintf (&command_line, "%s %s", command_line, argv[c]);
  	}





More information about the Commits mailing list