[svn-commits] may: branch may/ooh323_ipv6_direct_rtp r308502 - in /team/may/ooh323_ipv6_dir...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Feb 21 10:44:18 CST 2011


Author: may
Date: Mon Feb 21 10:44:12 2011
New Revision: 308502

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=308502
Log:
Merged revisions 308304,308346,308387,308439 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/team/may/ooh323_ipv6

................
  r308304 | root | 2011-02-19 14:20:48 +0300 (Sat, 19 Feb 2011) | 16 lines
  
  Merged revisions 308289 via svnmerge from 
  file:///srv/subversion/repos/asterisk/trunk
  
  ................
    r308289 | tilghman | 2011-02-19 05:03:44 -0600 (Sat, 19 Feb 2011) | 9 lines
    
    Merged revisions 308288 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.8
    
    ........
      r308288 | tilghman | 2011-02-19 05:02:49 -0600 (Sat, 19 Feb 2011) | 2 lines
      
      A few more (copies of) files to ignore in this directory.
    ........
  ................
................
  r308346 | root | 2011-02-19 17:20:37 +0300 (Sat, 19 Feb 2011) | 13 lines
  
  Merged revisions 308331 via svnmerge from 
  file:///srv/subversion/repos/asterisk/trunk
  
  ........
    r308331 | lathama | 2011-02-19 08:07:38 -0600 (Sat, 19 Feb 2011) | 7 lines
    
    Add CSS MIME Type
    
    Modern browsers are checking for the MIME Type of pages
    and in some cases will not load a file if the type is
    wrong.
  ........
................
  r308387 | root | 2011-02-21 17:22:35 +0300 (Mon, 21 Feb 2011) | 25 lines
  
  Merged revisions 308371-308372 via svnmerge from 
  file:///srv/subversion/repos/asterisk/trunk
  
  ........
    r308371 | tzafrir | 2011-02-21 07:58:18 -0600 (Mon, 21 Feb 2011) | 12 lines
    
    fix a memory leak in device state
    
    The callback handle_statechange (pbx.c) fails to release its data
    pointer, leaking memory in the process.
    
    Reported by: tzafrir
    Patches:
          18735_pbx_free_callback.diff uploaded by tzafrir (license 46)
    
    Review: https://reviewboard.asterisk.org/r/1110/
  ........
    r308372 | lathama | 2011-02-21 08:14:41 -0600 (Mon, 21 Feb 2011) | 5 lines
    
    Add HTTP URI Debug logging and update notice
    
    enable reporting of the request URI / URL in debugging
    change funny debug note to a serious note.
  ........
................
  r308439 | root | 2011-02-21 18:22:23 +0300 (Mon, 21 Feb 2011) | 33 lines
  
  Merged revisions 308417 via svnmerge from 
  file:///srv/subversion/repos/asterisk/trunk
  
  ................
    r308417 | mnicholson | 2011-02-21 09:04:19 -0600 (Mon, 21 Feb 2011) | 26 lines
    
    Merged revisions 308416 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.8
    
    ................
      r308416 | mnicholson | 2011-02-21 09:02:20 -0600 (Mon, 21 Feb 2011) | 19 lines
      
      Merged revisions 308414 via svnmerge from 
      https://origsvn.digium.com/svn/asterisk/branches/1.6.2
      
      ................
        r308414 | mnicholson | 2011-02-21 09:00:22 -0600 (Mon, 21 Feb 2011) | 12 lines
        
        Merged revisions 308413 via svnmerge from 
        https://origsvn.digium.com/svn/asterisk/branches/1.4
        
        ........
          r308413 | mnicholson | 2011-02-21 08:57:15 -0600 (Mon, 21 Feb 2011) | 5 lines
          
          Properly check the bounds of arrays when decoding UDPTL packets.  Also, remove broken support for receiving UDPTL packets larger than 16k.  That shouldn't ever happen anyway.
          
          AST-2011-002
          FAX-281
        ........
      ................
    ................
  ................
................

Modified:
    team/may/ooh323_ipv6_direct_rtp/   (props changed)
    team/may/ooh323_ipv6_direct_rtp/main/http.c
    team/may/ooh323_ipv6_direct_rtp/main/pbx.c
    team/may/ooh323_ipv6_direct_rtp/main/udptl.c
    team/may/ooh323_ipv6_direct_rtp/utils/   (props changed)

Propchange: team/may/ooh323_ipv6_direct_rtp/
------------------------------------------------------------------------------
    automerge = *

Propchange: team/may/ooh323_ipv6_direct_rtp/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.

Propchange: team/may/ooh323_ipv6_direct_rtp/
------------------------------------------------------------------------------
--- svnmerge-custom (original)
+++ svnmerge-custom Mon Feb 21 10:44:12 2011
@@ -1,1 +1,1 @@
-/team/may/ooh323_ipv6:1-308284
+/team/may/ooh323_ipv6:1-308501

Propchange: team/may/ooh323_ipv6_direct_rtp/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Feb 21 10:44:12 2011
@@ -1,1 +1,1 @@
-/trunk:1-308282
+/trunk:1-308438

Modified: team/may/ooh323_ipv6_direct_rtp/main/http.c
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6_direct_rtp/main/http.c?view=diff&rev=308502&r1=308501&r2=308502
==============================================================================
--- team/may/ooh323_ipv6_direct_rtp/main/http.c (original)
+++ team/may/ooh323_ipv6_direct_rtp/main/http.c Mon Feb 21 10:44:12 2011
@@ -112,6 +112,7 @@
 	{ "gif", "image/gif" },
 	{ "html", "text/html" },
 	{ "htm", "text/html" },
+	{ "css", "text/css" },
 	{ "cnf", "text/plain" },
 	{ "cfg", "text/plain" },
 	{ "bin", "application/octet-stream" },
@@ -644,6 +645,9 @@
 	struct ast_variable *get_vars = NULL, *v, *prev = NULL;
 	struct http_uri_redirect *redirect;
 
+	if (option_debug > 4)
+		ast_verbose("HTTP Request URI is %s \n", uri);
+
 	strsep(&params, "?");
 	/* Extract arguments from the request and store them in variables. */
 	if (params) {
@@ -787,7 +791,7 @@
 		}
 
 		if (option_debug) {
-			ast_debug(1, "mmm ... cookie!  Name: '%s'  Value: '%s'\n", name, val);
+			ast_debug(1, "HTTP Cookie, Name: '%s'  Value: '%s'\n", name, val);
 		}
 
 		var = ast_variable_new(name, val, __FILE__);

Modified: team/may/ooh323_ipv6_direct_rtp/main/pbx.c
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6_direct_rtp/main/pbx.c?view=diff&rev=308502&r1=308501&r2=308502
==============================================================================
--- team/may/ooh323_ipv6_direct_rtp/main/pbx.c (original)
+++ team/may/ooh323_ipv6_direct_rtp/main/pbx.c Mon Feb 21 10:44:12 2011
@@ -4348,9 +4348,11 @@
 	struct ao2_iterator cb_iter;
 
 	if (ao2_container_count(hintdevices) == 0) {
+		ast_free(sc);
 		return 0;
 	}
 	if (!(cmpdevice = ast_malloc(sizeof(*cmpdevice) + strlen(sc->dev)))) {
+		ast_free(sc);
 		return -1;
 	}
 	strcpy(cmpdevice->hintdevice, sc->dev);
@@ -4414,6 +4416,7 @@
 	if (cmpdevice) {
 		ast_free(cmpdevice);
 	}
+	ast_free(sc);
 	return 0;
 }
 

Modified: team/may/ooh323_ipv6_direct_rtp/main/udptl.c
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6_direct_rtp/main/udptl.c?view=diff&rev=308502&r1=308501&r2=308502
==============================================================================
--- team/may/ooh323_ipv6_direct_rtp/main/udptl.c (original)
+++ team/may/ooh323_ipv6_direct_rtp/main/udptl.c Mon Feb 21 10:44:12 2011
@@ -216,38 +216,29 @@
 	}
 	*pvalue = (buf[*len] & 0x3F) << 14;
 	(*len)++;
-	/* Indicate we have a fragment */
+	/* We have a fragment.  Currently we don't process fragments. */
+	ast_debug(1, "UDPTL packet with length greater than 16K received, decoding will fail\n");
 	return 1;
 }
 /*- End of function --------------------------------------------------------*/
 
 static int decode_open_type(uint8_t *buf, unsigned int limit, unsigned int *len, const uint8_t **p_object, unsigned int *p_num_octets)
 {
-	unsigned int octet_cnt;
-	unsigned int octet_idx;
-	unsigned int i;
-	int length; /* a negative length indicates the limit has been reached in decode_length. */
-	const uint8_t **pbuf;
-
-	for (octet_idx = 0, *p_num_octets = 0; ; octet_idx += octet_cnt) {
-		octet_cnt = 0;
-		if ((length = decode_length(buf, limit, len, &octet_cnt)) < 0)
+	unsigned int octet_cnt = 0;
+
+	if (decode_length(buf, limit, len, &octet_cnt) != 0)
+		return -1;
+
+	if (octet_cnt > 0) {
+		/* Make sure the buffer contains at least the number of bits requested */
+		if ((*len + octet_cnt) > limit)
 			return -1;
-		if (octet_cnt > 0) {
-			*p_num_octets += octet_cnt;
-
-			pbuf = &p_object[octet_idx];
-			i = 0;
-			/* Make sure the buffer contains at least the number of bits requested */
-			if ((*len + octet_cnt) > limit)
-				return -1;
-
-			*pbuf = &buf[*len];
-			*len += octet_cnt;
-		}
-		if (length == 0)
-			break;
-	}
+
+		*p_num_octets = octet_cnt;
+		*p_object = &buf[*len];
+		*len += octet_cnt;
+	}
+
 	return 0;
 }
 /*- End of function --------------------------------------------------------*/
@@ -334,8 +325,8 @@
 	const uint8_t *data;
 	unsigned int ifp_len;
 	int repaired[16];
-	const uint8_t *bufs[16];
-	unsigned int lengths[16];
+	const uint8_t *bufs[ARRAY_LEN(s->f) - 1];
+	unsigned int lengths[ARRAY_LEN(s->f) - 1];
 	int span;
 	int entries;
 	int ifp_no;
@@ -365,13 +356,13 @@
 			do {
 				if ((stat2 = decode_length(buf, len, &ptr, &count)) < 0)
 					return -1;
-				for (i = 0; i < count; i++) {
+				for (i = 0; i < count && total_count + i < ARRAY_LEN(bufs); i++) {
 					if ((stat1 = decode_open_type(buf, len, &ptr, &bufs[total_count + i], &lengths[total_count + i])) != 0)
 						return -1;
 				}
-				total_count += count;
-			}
-			while (stat2 > 0);
+				total_count += i;
+			}
+			while (stat2 > 0 && total_count < ARRAY_LEN(bufs));
 			/* Step through in reverse order, so we go oldest to newest */
 			for (i = total_count; i > 0; i--) {
 				if (seq_no - i >= s->rx_seq_no) {
@@ -434,6 +425,9 @@
 		if (ptr + 1 > len)
 			return -1;
 		entries = buf[ptr++];
+		if (entries > MAX_FEC_ENTRIES) {
+			return -1;
+		}
 		s->rx[x].fec_entries = entries;
 
 		/* Decode the elements */

Propchange: team/may/ooh323_ipv6_direct_rtp/utils/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Mon Feb 21 10:44:12 2011
@@ -10,10 +10,12 @@
 astman
 astobj2.c
 check_expr
+check_expr2
 conf2ael
 hashtab.c
 hashtest
 hashtest2
+lock.c
 md5.c
 muted
 pbx_ael.c




More information about the svn-commits mailing list