From: Sean Bright Date: Fri, 16 Jul 2010 15:20:40 +0000 (+0000) Subject: Avoid crashing when installing a duplicate translation path with a lower cost. X-Git-Tag: 11.0.0-beta1~2635 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=215fb1ab9fa9be8393be355916bcca6bf13c41d4;p=thirdparty%2Fasterisk.git Avoid crashing when installing a duplicate translation path with a lower cost. (closes issue #17092) Reported by: moy Patches: translate.rev254273.patch uploaded by moy (license 222) Tested by: moy git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@277143 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/main/translate.c b/main/translate.c index 9f832a65d7..24d8864732 100644 --- a/main/translate.c +++ b/main/translate.c @@ -652,6 +652,7 @@ int __ast_register_translator(struct ast_translator *t, struct ast_module *mod) (u->cost > t->cost)) { AST_RWLIST_INSERT_BEFORE_CURRENT(t, list); t = NULL; + break; } } AST_RWLIST_TRAVERSE_SAFE_END;