[Asterisk-cvs] asterisk channel.c,1.161,1.162
markster at lists.digium.com
markster at lists.digium.com
Sun Jan 9 03:38:30 CST 2005
Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv11469
Modified Files:
channel.c
Log Message:
Don't allow masquerading into oneself (bug #3040)
Index: channel.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channel.c,v
retrieving revision 1.161
retrieving revision 1.162
diff -u -d -r1.161 -r1.162
--- channel.c 8 Jan 2005 17:23:29 -0000 1.161
+++ channel.c 9 Jan 2005 09:42:54 -0000 1.162
@@ -2208,6 +2208,10 @@
{
struct ast_frame null = { AST_FRAME_NULL, };
int res = -1;
+ if (original == clone) {
+ ast_log(LOG_WARNING, "Can't masquerade channel '%s' into itself!\n", original->name);
+ return -1;
+ }
ast_mutex_lock(&original->lock);
while(ast_mutex_trylock(&clone->lock)) {
ast_mutex_unlock(&original->lock);
More information about the svn-commits
mailing list