]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
channel.c: Address stack overflow in does_id_conflict()
authorGeorge Joseph <gjoseph@digium.com>
Fri, 21 Sep 2018 20:23:34 +0000 (14:23 -0600)
committerGeorge Joseph <gjoseph@digium.com>
Fri, 21 Sep 2018 20:32:23 +0000 (15:32 -0500)
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

main/channel.c

index c0e3cb43eca0932ace96c1024462e32979247319..74cd65f8922b2b213b77db76dc3923aa1057e30b 100644 (file)
@@ -751,7 +751,7 @@ static int ast_channel_by_uniqueid_cb(void *obj, void *arg, void *data, int flag
 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;