From f02e26feffb1e36670a046d56fb9c66174b41c4a Mon Sep 17 00:00:00 2001
From: Russell Bryant <russell@russellbryant.com>
Date: Tue, 15 May 2007 22:57:01 +0000
Subject: [PATCH] Make sure that DUNDIRESULT is given an ID.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@64469 65c4cc65-6c06-0410-ace0-fbb531ad65f3
---
 pbx/pbx_dundi.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/pbx/pbx_dundi.c b/pbx/pbx_dundi.c
index 16cf4eb2a6..433558dbb9 100644
--- a/pbx/pbx_dundi.c
+++ b/pbx/pbx_dundi.c
@@ -3986,6 +3986,11 @@ static int dundi_result_read(struct ast_channel *chan, const char *cmd, char *da
 
 	AST_STANDARD_APP_ARGS(args, parse);
 
+	if (ast_strlen_zero(args.id)) {
+		ast_log(LOG_ERROR, "A result ID must be provided to DUNDIRESULT\n");
+		goto finish;
+	}
+
 	if (ast_strlen_zero(args.resultnum)) {
 		ast_log(LOG_ERROR, "A result number must be given to DUNDIRESULT!\n");
 		goto finish;
-- 
GitLab