Summary: | ASTERISK-04312: [patch] ast_pbx_outgoing_app crashes if called will null appdata and sync > 0 | ||
Reporter: | jshugart (jshugart) | Labels: | |
Date Opened: | 2005-06-01 11:21:32 | Date Closed: | 2008-01-15 15:37:14.000-0600 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Core/General |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) pbx.c.patch1 | |
Description: | A strncpy is done on appdata even if null, but only if sync > 0. | ||
Comments: | By: Michael Jerris (mikej) 2005-06-01 11:58:11 let's save ourselves another cylce or two and use ast_copy_string for this unless there is a good reason not to. By: jshugart (jshugart) 2005-06-01 12:09:33 Do you want me to update all the strncpy in this area? I can update the patch and resubmit. By: Clod Patry (junky) 2005-06-01 12:12:47 It will requires an huge review, but yes, that would be cool, it has to be done one day or another. By: Michael Jerris (mikej) 2005-06-01 12:20:15 Be aware that the behavior of ast_copy_string is a little different, so we need to make sure we don't break anything.. I generally think get your patch in and follow it up with another one for changes to the rest of the code. By: Brian West (bkw918) 2005-06-01 15:16:45 1. Its a two line patch. 2. It could be corrected when commited or are the people with commit power just that damn lazy? 3. why are we even talking about it.. its a bug lets fix it and MOVE ON! NEXT!!! /b By: Brian West (bkw918) 2005-06-01 17:14:29 Good job! ;) /b By: Michael Jerris (mikej) 2005-06-01 17:42:53 Ok, I know I am dragging this one out, but shouldn't: ast_copy_string(tmp->data, appdata, sizeof(tmp->data) - 1); be: ast_copy_string(tmp->data, appdata, sizeof(tmp->data)); By: Kevin P. Fleming (kpfleming) 2005-06-05 12:06:33 Committed to CVS HEAD, thanks! By: Digium Subversion (svnbot) 2008-01-15 15:37:14.000-0600 Repository: asterisk Revision: 5848 U trunk/pbx.c ------------------------------------------------------------------------ r5848 | kpfleming | 2008-01-15 15:37:14 -0600 (Tue, 15 Jan 2008) | 2 lines don't try to copy NULL appdata (bug ASTERISK-4312) ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=5848 |