[asterisk-commits] tilghman: branch 1.6.0 r237575 - in /branches/1.6.0: ./ main/say.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jan 4 15:51:57 CST 2010


Author: tilghman
Date: Mon Jan  4 15:51:55 2010
New Revision: 237575

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=237575
Log:
Merged revisions 237574 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
  r237574 | tilghman | 2010-01-04 15:48:20 -0600 (Mon, 04 Jan 2010) | 13 lines
  
  Merged revisions 237573 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r237573 | tilghman | 2010-01-04 15:45:46 -0600 (Mon, 04 Jan 2010) | 6 lines
    
    Bounds checking for input string
    (closes issue #16407)
     Reported by: qwell
     Patches: 
           20100104__issue16407.diff.txt uploaded by tilghman (license 14)
  ........
................

Modified:
    branches/1.6.0/   (props changed)
    branches/1.6.0/main/say.c

Propchange: branches/1.6.0/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.0/main/say.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.0/main/say.c?view=diff&rev=237575&r1=237574&r2=237575
==============================================================================
--- branches/1.6.0/main/say.c (original)
+++ branches/1.6.0/main/say.c Mon Jan  4 15:51:55 2010
@@ -3495,9 +3495,9 @@
 			/* NOTE:  if you add more options here, please try to be consistent with strftime(3) */
 			case '\'':
 				/* Literal name of a sound file */
-				sndoffset=0;
-				for (sndoffset=0 ; (format[++offset] != '\'') && (sndoffset < sizeof(sndfile) - 1) ; sndoffset++)
+				for (sndoffset = 0; !strchr("\'\0", format[++offset]) && (sndoffset < sizeof(sndfile) - 1) ; sndoffset++) {
 					sndfile[sndoffset] = format[offset];
+				}
 				sndfile[sndoffset] = '\0';
 				res = wait_file(chan, ints, sndfile, lang);
 				break;
@@ -3742,9 +3742,9 @@
 			/* NOTE:  if you add more options here, please try to be consistent with strftime(3) */
 			case '\'':
 				/* Literal name of a sound file */
-				sndoffset=0;
-				for (sndoffset=0 ; (format[++offset] != '\'') && (sndoffset < sizeof(sndfile) - 1) ; sndoffset++)
+				for (sndoffset = 0; !strchr("\'\0", format[++offset]) && (sndoffset < sizeof(sndfile) - 1) ; sndoffset++) {
 					sndfile[sndoffset] = format[offset];
+				}
 				sndfile[sndoffset] = '\0';
 				res = wait_file(chan, ints, sndfile, lang);
 				break;
@@ -3944,9 +3944,9 @@
 			/* NOTE:  if you add more options here, please try to be consistent with strftime(3) */
 			case '\'':
 				/* Literal name of a sound file */
-				sndoffset=0;
-				for (sndoffset=0 ; (format[++offset] != '\'') && (sndoffset < sizeof(sndfile) - 1) ; sndoffset++)
+				for (sndoffset = 0; !strchr("\'\0", format[++offset]) && (sndoffset < sizeof(sndfile) - 1) ; sndoffset++) {
 					sndfile[sndoffset] = format[offset];
+				}
 				sndfile[sndoffset] = '\0';
 				res = wait_file(chan, ints, sndfile, lang);
 				break;
@@ -4147,8 +4147,7 @@
 			/* NOTE:  if you add more options here, please try to be consistent with strftime(3) */
 			case '\'':
 				/* Literal name of a sound file */
-				sndoffset=0;
-				for (sndoffset=0 ; (format[++offset] != '\'') && (sndoffset < sizeof(sndfile) - 1) ; sndoffset++) {
+				for (sndoffset = 0; !strchr("\'\0", format[++offset]) && (sndoffset < sizeof(sndfile) - 1) ; sndoffset++) {
 					sndfile[sndoffset] = format[offset];
 				}
 				sndfile[sndoffset] = '\0';
@@ -4342,9 +4341,9 @@
 			/* NOTE:  if you add more options here, please try to be consistent with strftime(3) */
 			case '\'':
 				/* Literal name of a sound file */
-				sndoffset=0;
-				for (sndoffset=0 ; (format[++offset] != '\'') && (sndoffset < sizeof(sndfile) - 1) ; sndoffset++)
+				for (sndoffset = 0; !strchr("\'\0", format[++offset]) && (sndoffset < sizeof(sndfile) - 1) ; sndoffset++) {
 					sndfile[sndoffset] = format[offset];
+				}
 				sndfile[sndoffset] = '\0';
 				res = wait_file(chan, ints, sndfile, lang);
 				break;
@@ -4482,9 +4481,9 @@
 			/* NOTE:  if you add more options here, please try to be consistent with strftime(3) */
 			case '\'':
 				/* Literal name of a sound file */
-				sndoffset=0;
-				for (sndoffset=0 ; (format[++offset] != '\'') && (sndoffset < sizeof(sndfile) - 1) ; sndoffset++)
+				for (sndoffset = 0; !strchr("\'\0", format[++offset]) && (sndoffset < sizeof(sndfile) - 1) ; sndoffset++) {
 					sndfile[sndoffset] = format[offset];
+				}
 				sndfile[sndoffset] = '\0';
 				snprintf(nextmsg, sizeof(nextmsg), "%s", sndfile);
 				res = wait_file(chan, ints, nextmsg, lang);
@@ -4671,9 +4670,9 @@
 			/* NOTE:  if you add more options here, please try to be consistent with strftime(3) */
 			case '\'':
 				/* Literal name of a sound file */
-				sndoffset=0;
-				for (sndoffset=0 ; (format[++offset] != '\'') && (sndoffset < sizeof(sndfile) - 1) ; sndoffset++)
+				for (sndoffset = 0; !strchr("\'\0", format[++offset]) && (sndoffset < sizeof(sndfile) - 1) ; sndoffset++) {
 					sndfile[sndoffset] = format[offset];
+				}
 				sndfile[sndoffset] = '\0';
 				res = wait_file(chan, ints, sndfile, lang);
 				break;
@@ -4866,9 +4865,9 @@
 			/* NOTE:  if you add more options here, please try to be consistent with strftime(3) */
 			case '\'':
 				/* Literal name of a sound file */
-				sndoffset=0;
-				for (sndoffset=0 ; (format[++offset] != '\'') && (sndoffset < sizeof(sndfile) - 1) ; sndoffset++)
+				for (sndoffset = 0; !strchr("\'\0", format[++offset]) && (sndoffset < sizeof(sndfile) - 1) ; sndoffset++) {
 					sndfile[sndoffset] = format[offset];
+				}
 				sndfile[sndoffset] = '\0';
 				res = wait_file(chan, ints, sndfile, lang);
 				break;
@@ -5096,9 +5095,9 @@
 			/* NOTE:  if you add more options here, please try to be consistent with strftime(3) */
 			case '\'':
 				/* Literal name of a sound file */
-				sndoffset=0;
-				for (sndoffset=0 ; (format[++offset] != '\'') && (sndoffset < sizeof(sndfile) - 1) ; sndoffset++)
+				for (sndoffset = 0; !strchr("\'\0", format[++offset]) && (sndoffset < sizeof(sndfile) - 1) ; sndoffset++) {
 					sndfile[sndoffset] = format[offset];
+				}
 				sndfile[sndoffset] = '\0';
 				res = wait_file(chan, ints, sndfile, lang);
 				break;
@@ -5299,9 +5298,9 @@
 			/* NOTE:  if you add more options here, please try to be consistent with strftime(3) */
 			case '\'':
 				/* Literal name of a sound file */
-				sndoffset = 0;
-				for (sndoffset = 0 ; (format[++offset] != '\'') && (sndoffset < sizeof(sndfile) - 1) ; sndoffset++)
+				for (sndoffset = 0; !strchr("\'\0", format[++offset]) && (sndoffset < sizeof(sndfile) - 1) ; sndoffset++) {
 					sndfile[sndoffset] = format[offset];
+				}
 				sndfile[sndoffset] = '\0';
 				res = wait_file(chan, ints, sndfile, lang);
 				break;
@@ -5518,9 +5517,9 @@
 			/* NOTE:  if you add more options here, please try to be consistent with strftime(3) */
 			case '\'':
 				/* Literal name of a sound file */
-				sndoffset=0;
-				for (sndoffset=0 ; (format[++offset] != '\'') && (sndoffset < sizeof(sndfile) - 1) ; sndoffset++)
+				for (sndoffset = 0; !strchr("\'\0", format[++offset]) && (sndoffset < sizeof(sndfile) - 1) ; sndoffset++) {
 					sndfile[sndoffset] = format[offset];
+				}
 				sndfile[sndoffset] = '\0';
 				snprintf(nextmsg, sizeof(nextmsg), "%s", sndfile);
 				res = wait_file(chan, ints, nextmsg, lang);
@@ -5810,9 +5809,9 @@
 			/* NOTE:  if you add more options here, please try to be consistent with strftime(3) */
 			case '\'':
 				/* Literal name of a sound file */
-				sndoffset=0;
-				for (sndoffset=0 ; (format[++offset] != '\'') && (sndoffset < sizeof(sndfile) - 1) ; sndoffset++)
+				for (sndoffset = 0; !strchr("\'\0", format[++offset]) && (sndoffset < sizeof(sndfile) - 1) ; sndoffset++) {
 					sndfile[sndoffset] = format[offset];
+				}
 				sndfile[sndoffset] = '\0';
 				res = wait_file(chan, ints, sndfile, lang);
 				break;
@@ -7299,9 +7298,9 @@
 			/* NOTE:  if you add more options here, please try to be consistent with strftime(3) */
 		case '\'':
 			/* Literal name of a sound file */
-			sndoffset=0;
-			for (sndoffset=0 ; (format[++offset] != '\'') && (sndoffset < sizeof(sndfile) - 1) ; sndoffset++)
+			for (sndoffset = 0; !strchr("\'\0", format[++offset]) && (sndoffset < sizeof(sndfile) - 1) ; sndoffset++) {
 				sndfile[sndoffset] = format[offset];
+			}
 			sndfile[sndoffset] = '\0';
 			res = wait_file(chan, ints, sndfile, lang);
 			break;




More information about the asterisk-commits mailing list