[Pkg-voip-commits] [pjproject] 13/14: r5477 svn backport Fix DNS write on freed memory.
Bernhard Schmidt
berni at moszumanska.debian.org
Thu Nov 10 09:32:02 UTC 2016
This is an automated email from the git hooks/post-receive script.
berni pushed a commit to branch master
in repository pjproject.
commit 7a07460e75b42f2a8f02381a88140491d1703b94
Author: Richard Mudgett <rmudgett at digium.com>
Date: Tue Nov 1 12:55:31 2016 -0500
r5477 svn backport Fix DNS write on freed memory.
Re #1974: Fix DNS write on freed memory.
Thanks to Richard Mudgett for the patch.
Patch-Category: asterisk
---
pjlib-util/src/pjlib-util/resolver.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/pjlib-util/src/pjlib-util/resolver.c b/pjlib-util/src/pjlib-util/resolver.c
index 52b7655..365772e 100644
--- a/pjlib-util/src/pjlib-util/resolver.c
+++ b/pjlib-util/src/pjlib-util/resolver.c
@@ -908,7 +908,13 @@ PJ_DEF(pj_status_t) pj_dns_resolver_start_query( pj_dns_resolver *resolver,
/* Must return PJ_SUCCESS */
status = PJ_SUCCESS;
- goto on_return;
+ /*
+ * We cannot write to *p_query after calling cb because what
+ * p_query points to may have been freed by cb.
+ * Refer to ticket #1974.
+ */
+ pj_mutex_unlock(resolver->mutex);
+ return status;
}
/* At this point, we have a cached entry, but this entry has expired.
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-voip/pjproject.git
More information about the Pkg-voip-commits
mailing list