[PD-cvs] pd/src s_main.c,1.7.4.17.2.14,1.7.4.17.2.15

Thomas Grill xovo at users.sourceforge.net
Sat Jun 17 01:12:02 CEST 2006


Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4557

Modified Files:
      Tag: devel_0_39
	s_main.c 
Log Message:
fixed overflow bug for -typeface option... longer typenames spilled over into DAC settings

Index: s_main.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/s_main.c,v
retrieving revision 1.7.4.17.2.14
retrieving revision 1.7.4.17.2.15
diff -C2 -d -r1.7.4.17.2.14 -r1.7.4.17.2.15
*** s_main.c	23 Apr 2006 12:09:04 -0000	1.7.4.17.2.14
--- s_main.c	16 Jun 2006 23:12:00 -0000	1.7.4.17.2.15
***************
*** 76,80 ****
  int sys_midioutdevlist[MAXMIDIOUTDEV] = {1};
  
! char sys_font[] = "courier"; /* tb: font name */
  static int sys_main_srate;
  static int sys_main_dacblocksize = DEFDACBLKSIZE;
--- 76,81 ----
  int sys_midioutdevlist[MAXMIDIOUTDEV] = {1};
  
! char sys_font[100] = "courier"; /* tb: font name */
! 
  static int sys_main_srate;
  static int sys_main_dacblocksize = DEFDACBLKSIZE;
***************
*** 825,829 ****
      	else if (!strcmp(*argv, "-typeface") && argc > 1)
      	{
! 		strcpy(sys_font,*(argv+1));
  			argc -= 2;
  			argv += 2;
--- 826,831 ----
      	else if (!strcmp(*argv, "-typeface") && argc > 1)
      	{
!     		strncpy(sys_font,*(argv+1),sizeof sys_font-1); 
!             sys_font[sizeof(sys_font)-1] = 0; /* set trailing 0 in case of space exhaustion */
  			argc -= 2;
  			argv += 2;





More information about the Pd-cvs mailing list