[Asterisk-code-review] channel.c: Address stack overflow in does id conflict() (asterisk[13])

George Joseph asteriskteam at digium.com
Fri Sep 21 15:25:56 CDT 2018


George Joseph has uploaded this change for review. ( https://gerrit.asterisk.org/10240


Change subject: channel.c:  Address stack overflow in does_id_conflict()
......................................................................

channel.c:  Address stack overflow in does_id_conflict()

does_id_conflict() was passing a pointer to an int to a callback
that expected a pointer to a size_t.

Found by the Address Sanitizer.

Change-Id: I0ff542067eef63a14a60301654d65d34fe2ad503
---
M main/channel.c
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/40/10240/1

diff --git a/main/channel.c b/main/channel.c
index ca50d46..5fc9cd8 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -771,7 +771,7 @@
 static int does_id_conflict(const char *uniqueid)
 {
 	struct ast_channel *conflict;
-	int length = 0;
+	size_t length = 0;
 
 	if (ast_strlen_zero(uniqueid)) {
 		return 0;

-- 
To view, visit https://gerrit.asterisk.org/10240
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0ff542067eef63a14a60301654d65d34fe2ad503
Gerrit-Change-Number: 10240
Gerrit-PatchSet: 1
Gerrit-Owner: George Joseph <gjoseph at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180921/7b7b5069/attachment.html>


More information about the asterisk-code-review mailing list