]> git.ipfire.org Git - thirdparty/asterisk.git/commit
srv: Fix crash when ast_srv_lookup is used and 0 records are returned. 98/4898/1
authorJoshua Colp <jcolp@digium.com>
Tue, 7 Feb 2017 18:01:03 +0000 (18:01 +0000)
committerJoshua Colp <jcolp@digium.com>
Tue, 7 Feb 2017 18:13:16 +0000 (12:13 -0600)
commit861e5d2114c9c3cc0028c081d2a5249621917dfa
treef9034510d1a70cf2c09a9d547e8fa235658e8b95
parent382f1d856f89fc3f4b0cfaec3038321250b4f15d
srv: Fix crash when ast_srv_lookup is used and 0 records are returned.

When performing an SRV lookup using the ast_srv_lookup function it
did not properly handle the situation where 0 records are returned.
If this happened it would wrongly assume that at least one record
was present.

This change fixes the code so it will exit early if an error occurs
or if 0 records are returned.

ASTERISK-26772
patches:
  srv_lookup.patch submitted by nappsoft (license 6822)

Change-Id: I09b19081c74e0ad11c12bf54a257243b1bcb2351
main/srv.c