[Home]

Summary:ASTERISK-24732: [patch]CLI "core show channel" gets "failed to extend from %d to %d" message for large native formats list.
Reporter:Richard Mudgett (rmudgett)Labels:
Date Opened:2015-01-28 13:15:55.000-0600Date Closed:2015-11-10 11:44:08.000-0600
Priority:MajorRegression?
Status:Closed/CompleteComponents:Core/General
Versions:13.1.0 Frequency of
Occurrence
Occasional
Related
Issues:
is duplicated byASTERISK-25533 [patch] buffer for ast_format_cap_get_names only 64 bytes
Environment:Attachments:( 0) jira_asterisk_24732_example_v13.patch
Description:Occasionally I get "failed to extend from %d to %d" messages output.  In this case I performed a CLI "core show channel CBRec/xxx" and got the message for the native formats on the channel.

The culprit is the ast_str variable is declared too small to list all formats.  An audit is need for the uses of ast_str_alloca() when used to hold the format capabilities string.  Currently ast_str_alloca(64) is used throughout the code base for this particular case.  The 64 needs to be replaced with a define to eliminate the magic number and the number needs to be increased to 256 when all codecs are allowed.
Comments: