[asterisk-commits] rmudgett: branch 1.8 r423979 - /branches/1.8/res/res_fax.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Sep 26 10:16:16 CDT 2014


Author: rmudgett
Date: Fri Sep 26 10:16:11 2014
New Revision: 423979

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=423979
Log:
res_fax: Fix out of bounds error in update_modem_bits().

ASTERISK-24357 #close
Reported by: Jeremy Laine
Patches:
      res_fax_bounds.patch (license #6561) patch uploaded by Jeremy Laine
	  Modified patch to not use magic numbers.

Modified:
    branches/1.8/res/res_fax.c

Modified: branches/1.8/res/res_fax.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/res/res_fax.c?view=diff&rev=423979&r1=423978&r2=423979
==============================================================================
--- branches/1.8/res/res_fax.c (original)
+++ branches/1.8/res/res_fax.c Fri Sep 26 10:16:11 2014
@@ -467,7 +467,7 @@
 		m[i] = NULL;
 	} else {
 		tok = strtok(v, ", ");
-		while (tok && (i < 5)) {
+		while (tok && i < ARRAY_LEN(m) - 1) {
 			m[i++] = tok;
 			tok = strtok(NULL, ", ");
 		}




More information about the asterisk-commits mailing list