[Home]

Summary:ASTERISK-04264: Code bug in chan_iax2.c
Reporter:sofox (sofox)Labels:
Date Opened:2005-05-24 05:13:21Date Closed:2011-06-07 14:10:13
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:Should the code below [line 2715]

                       if (context)
                               ast_copy_string(context, p->context, sizeof(context));
                       if (peercontext)
                               ast_copy_string(peercontext, p->peercontext, sizeof(peercontext));

be changed to

                       if (context)
                               ast_copy_string(context, p->context, AST_MAX_EXTENSION-1);
                       if (peercontext)
                               ast_copy_string(peercontext, p->peercontext, AST_MAX_EXTENSION-1);
Comments:By: Russell Bryant (russell) 2005-05-24 05:58:05

No.  :)

The size of context and regcontext is already AST_MAX_EXTENSION.  Also, with ast_copy_string, it is not necessary to subtract one from the destination buffer size.

Thanks for the lookout, though!