aboutsummaryrefslogtreecommitdiffstats
path: root/channels/iax2-parser.h
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-07-17 20:45:27 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-07-17 20:45:27 +0000
commit4c9df6e31f645075f68f03772cd2349fd5f4de37 (patch)
tree11d41aff9ddb9fb9cf8bc1e4677fcbe655ff331a /channels/iax2-parser.h
parent63e63a46448834f35ed2b498b1f5e88f6a138b56 (diff)
Ensure that when encoding the contents of an ast_frame into an iax_frame, that
the size of the destination buffer is known in the iax_frame so that code won't write past the end of the allocated buffer when sending outgoing frames. (ASA-2007-014) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@75444 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/iax2-parser.h')
-rw-r--r--channels/iax2-parser.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/channels/iax2-parser.h b/channels/iax2-parser.h
index dd90682c2..50e04538e 100644
--- a/channels/iax2-parser.h
+++ b/channels/iax2-parser.h
@@ -119,6 +119,8 @@ struct iax_frame {
struct iax_frame *prev;
/* Actual, isolated frame header */
struct ast_frame af;
+ /* Amount of data _allocated_ for afdata */
+ size_t afdatalen;
unsigned char unused[AST_FRIENDLY_OFFSET];
unsigned char afdata[0]; /* Data for frame */
};