Fix 'array subscript is above array bounds' warning in res_send.c
authorSiddhesh Poyarekar <siddhesh@redhat.com>
Tue, 16 Dec 2014 11:23:05 +0000 (16:53 +0530)
committerSiddhesh Poyarekar <siddhesh@redhat.com>
Tue, 16 Dec 2014 11:25:23 +0000 (16:55 +0530)
commita0d424ef9d7fc34f7d1a516f38c8efb1e8692a03
treee30a4786facc2274751209651c05de9b043f082f
parent8b460906cdb8ef1501fa5dcff54206b201e527d5
Fix 'array subscript is above array bounds' warning in res_send.c

I see this warning in my build on F21 x86_64, which seems to be due to
a weak check for array bounds.  Fixed by making the bounds check
stronger.

This is not an actual bug since nscount is never set to anything
greater than MAXNS.  The compiler however does not know this, so we
need the stronger bounds check to quieten the compiler.
ChangeLog
resolv/res_send.c