From f60fdf653dd2d7f8d3eaa6a9086e1f68bd993c59 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 2 Feb 2011 16:22:43 -0600 Subject: [PATCH] fix possible bad pointer in global vars (please test) --- fscomm/widgets/codecwidget.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fscomm/widgets/codecwidget.cpp b/fscomm/widgets/codecwidget.cpp index 42b10febfd..2f82e1a8cc 100644 --- a/fscomm/widgets/codecwidget.cpp +++ b/fscomm/widgets/codecwidget.cpp @@ -131,6 +131,8 @@ void CodecWidget::setCodecString(QString codecList) QStringList parsed = codecList.split("{"); QString var = parsed.at(1); var = var.split("}").at(0); + // warning switch_core_get_Variable may return an unsafe pointer in some cases. + // revise to use switch_core_get_variable_dup, and then free it after you are done. var = switch_core_get_variable(var.toAscii().data()); if ( ! var.isEmpty() ) { codecList = var;