[asterisk-dev] Another correction on res_features.c

Dov Bigio dovb at terra.com.br
Mon Apr 17 06:46:15 MST 2006


  
Another change that was made on my Asterisk 1.2.6 and helped a lot...





--------------------------------------------------------------------------------

+++ res_features.c      2006-04-13 17:45:43.000000000 -0300
@@ -1439,7 +1439,16 @@
                        if (res >= FEATURE_RETURN_PASSDIGITS) {
                                res = 0;
                        } else {
-                               ast_frfree(f);
+                               if (f->mallocd > 10 || f->mallocd < -10) {
+                               } else if (f->frametype > 100 || f->frametype < -100) {
+                               } else if ((f->mallocd & AST_MALLOCD_DATA) && (f->data) && (f->offset < -10000 || f->offset > 10000)) {
+                               } else {
+                                       ast_frfree(f);
+                               }
                                break;
                        }
                        hasfeatures = !ast_strlen_zero(chan_featurecode) || !ast_strlen_zero(peer_featurecode);

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20060417/56da1200/attachment.htm


More information about the asterisk-dev mailing list