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

Ton Voon tonvoon at users.sourceforge.net
Tue Mar 11 14:30:08 CET 2003


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

Modified Files:
	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.6
diff -C2 -r1.5 -r1.6
*** negate.c	12 Feb 2003 22:29:43 -0000	1.5
--- negate.c	11 Mar 2003 22:29:46 -0000	1.6
***************
*** 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