Richard Mudgett f997090877 
	
	
	pbx.c: Fix crash from malformed exten pattern. ... 
			Forgetting to indicate an exten is a pattern can cause a crash if the
"pattern" has a character set range.  e.g., "9999[3-5]" The crash is due
to a buffer overwrite because the '-' exten eye-candy wasn't removed as
expected and overran the allocated space.
The buffer overwrite is fixed two ways in this patch.
1) Fix ext_strncpy() to distinguish between pattern and non-pattern
extens.  Now '-' characters are removed when they are eye-candy and not
when they are part of a pattern character set.  Since the function is
private to pbx.c, the return value now returns the number of bytes written
to the destination buffer instead of the strlen() of the final buffer so
the callers that care don't need to add one.
2) Fix callers to ext_strncpy() to supply the correct available buffer
size of the destination buffer.
ASTERISK-26668
Change-Id: I555d97411140e47e0522684062d174fbe32aa84a 
		
	 
		2017-03-14 17:09:53 -06:00 
	 
	
	
	
		 
	
	
		
			
			
			
			
			
			2016-06-07 09:32:11 +02:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-03-01 09:30:43 -07:00 
		 
	
		
			
			
			
			
			
			2017-01-17 17:08:53 -06:00 
		 
	
		
			
			
			
			
			
			2016-12-22 12:25:15 -06:00 
		 
	
		
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2017-01-24 14:05:05 -06:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2017-01-24 11:25:19 -06:00 
		 
	
		
	
		
			
			
			
			
			
			2016-05-03 07:56:18 -05:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2017-02-13 11:33:15 -05:00 
		 
	
		
			
			
			
			
			
			2015-04-27 18:37:26 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2015-04-27 18:37:26 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2017-01-24 14:17:05 -06:00 
		 
	
		
			
			
			
			
			
			2017-02-01 17:00:26 -06:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2017-02-02 13:02:03 -06:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-11-04 15:50:41 -05:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2017-02-23 10:34:58 -07:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2017-02-13 11:33:15 -05:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2017-03-01 07:30:49 -07:00 
		 
	
		
			
			
			
			
			
			2017-03-01 07:30:49 -07:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2017-02-22 14:32:23 +00:00 
		 
	
		
			
			
			
			
			
			2016-11-16 14:56:18 -05:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-11-20 09:19:18 +11:00 
		 
	
		
			
			
			
			
			
			2016-11-20 09:19:18 +11:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-11-20 09:19:18 +11:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2015-04-10 13:32:24 +00:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-11-20 09:19:18 +11:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-20 09:53:24 +11:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-11-15 21:21:59 -05:00 
		 
	
		
			
			
			
			
			
			2017-01-17 17:08:53 -06:00 
		 
	
		
			
			
			
			
			
			2017-01-17 17:08:53 -06:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2017-02-13 07:49:25 -07:00 
		 
	
		
			
			
			
			
			
			2017-01-25 13:46:41 -06:00 
		 
	
		
			
			
			
			
			
			2016-11-06 15:56:58 +01:00 
		 
	
		
			
			
			
			
			
			2017-02-24 10:20:33 -06:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2017-02-16 05:48:41 -06:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2017-02-03 10:28:14 +02:00 
		 
	
		
			
			
			
			
			
			2017-01-17 17:08:53 -06:00 
		 
	
		
			
			
			
			
			
			2016-11-14 13:51:56 -05:00 
		 
	
		
			
			
			
			
			
			2017-01-24 11:25:19 -06:00 
		 
	
		
			
			
			
			
			
			2017-02-03 10:28:14 +02:00 
		 
	
		
	
		
			
			
			
			
			
			2016-10-28 10:24:26 -05:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2017-02-27 12:57:18 -06:00 
		 
	
		
			
			
			
			
			
			2016-11-14 17:03:09 -05:00 
		 
	
		
			
			
			
			
			
			2016-10-31 14:46:54 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2017-03-02 21:46:51 -06:00 
		 
	
		
			
			
			
			
			
			2015-04-17 15:58:07 -05:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2017-03-08 17:26:41 -06:00 
		 
	
		
	
		
			
			
			
			
			
			2016-12-14 11:38:06 -06:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-11-01 11:48:06 +02:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2017-02-13 11:33:15 -05:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2017-02-13 11:33:15 -05:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-07-21 13:58:26 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2017-03-14 17:09:53 -06:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2017-02-10 12:05:56 -06:00 
		 
	
		
			
			
			
			
			
			2017-03-06 15:59:49 -06:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2017-02-17 09:23:12 -06:00 
		 
	
		
			
			
			
			
			
			2017-02-17 09:47:47 -06:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2017-03-01 12:12:46 +00:00 
		 
	
		
			
			
			
			
			
			2017-02-17 09:47:47 -06:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
	
		
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2015-03-26 22:24:26 +00:00 
		 
	
		
			
			
			
			
			
			2017-02-07 12:13:23 -06:00 
		 
	
		
			
			
			
			
			
			2016-11-14 17:03:09 -05:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2017-02-03 16:42:52 -05:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
	
		
			
			
			
			
			
			2017-02-22 14:32:23 +00:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2017-01-23 10:25:58 -07:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2017-01-13 21:36:54 -06:00 
		 
	
		
			
			
			
			
			
			2017-02-17 17:00:24 -06:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-07-13 11:47:56 -05:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2017-01-23 13:25:31 +01:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
	
		
			
			
			
			
			
			2016-11-30 14:18:05 -05:00 
		 
	
		
			
			
			
			
			
			2014-12-17 10:23:32 +00:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00