chiark / gitweb /
resolve: fix NULL deref on strv comparison
authorDavid Herrmann <dh.herrmann@gmail.com>
Thu, 27 Nov 2014 15:08:46 +0000 (16:08 +0100)
committerDavid Herrmann <dh.herrmann@gmail.com>
Thu, 27 Nov 2014 15:10:44 +0000 (16:10 +0100)
commit0f84a72e3c0f58d71cff2121e6df1611eaf9c9ea
treedefc60dc5073ffe1c27cb2c33f6a73d2c3420619
parent342f3005f57fe293d3b43148f8c900f2cbc6f7f7
resolve: fix NULL deref on strv comparison

A strv might be NULL if it is empty. The txt.strings comparison doesn't
take that into account. Introduce strv_equal() to provide a proper helper
for this and fix resolve to use it.

Thanks to StanisÅ‚aw Pitucha <viraptor@gmail.com> for reporting this!
src/resolve/resolved-dns-rr.c
src/shared/strv.c
src/shared/strv.h