summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorIvan Poddubny <ivan.poddubny@gmail.com>2015-05-31 19:33:37 +0300
committerIvan Poddubny <ivan.poddubny@gmail.com>2015-05-31 12:29:21 -0500
commit0a5f8c0d73ac611687e5031d39e75b703777b6dc (patch)
tree5161efde6710e5fde00ce76d04f57f93a2b03ffe /include
parentbef000dd7c58485b340486a10477a84fff547e3f (diff)
Fix buffer overflow in slin sample frames generation.
The length of frames retured by sample functions was twice as large as real, what caused global buffer overflow caught by AddressSanitizer. ASTERISK-24717 #close Reported by: Badalian Vyacheslav Change-Id: Iec2fe682aef13e556684912f906bedf7c18229c6
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/slin.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/asterisk/slin.h b/include/asterisk/slin.h
index 148ee09ab..976637473 100644
--- a/include/asterisk/slin.h
+++ b/include/asterisk/slin.h
@@ -62,7 +62,7 @@ static inline struct ast_frame *slin8_sample(void)
{
static struct ast_frame f = {
.frametype = AST_FRAME_VOICE,
- .datalen = sizeof(ex_slin8) * 2,
+ .datalen = sizeof(ex_slin8),
.samples = ARRAY_LEN(ex_slin8),
.mallocd = 0,
.offset = 0,
@@ -79,7 +79,7 @@ static inline struct ast_frame *slin16_sample(void)
{
static struct ast_frame f = {
.frametype = AST_FRAME_VOICE,
- .datalen = sizeof(ex_slin16) * 2,
+ .datalen = sizeof(ex_slin16),
.samples = ARRAY_LEN(ex_slin16),
.mallocd = 0,
.offset = 0,