[asterisk-commits] russell: trunk r156298 - /trunk/res/res_clialiases.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Nov 12 13:38:51 CST 2008


Author: russell
Date: Wed Nov 12 13:38:51 2008
New Revision: 156298

URL: http://svn.digium.com/view/asterisk?view=rev&rev=156298
Log:
Fix a bug caused by using sizeof(pointer) instead of sizeof(the struct)

Modified:
    trunk/res/res_clialiases.c

Modified: trunk/res/res_clialiases.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_clialiases.c?view=diff&rev=156298&r1=156297&r2=156298
==============================================================================
--- trunk/res/res_clialiases.c (original)
+++ trunk/res/res_clialiases.c Wed Nov 12 13:38:51 2008
@@ -212,7 +212,7 @@
 			if (!(alias = ao2_alloc((sizeof(*alias) + strlen(v1->name) + strlen(v1->value) + 2), alias_destroy))) {
 				continue;
 			}
-			alias->alias = ((char *) alias) + sizeof(alias);
+			alias->alias = ((char *) alias) + sizeof(*alias);
 			alias->real_cmd = ((char *) alias) + strlen(v1->name) + 1;
 			strcpy(alias->alias, v1->name);
 			strcpy(alias->real_cmd, v1->value);




More information about the asterisk-commits mailing list