Warning implies possible kerberos bug in krb5int_dns_nextans() in dnsglue.c

Marus, Dennis Dennis.Marus at xerox.com
Mon Mar 17 11:24:40 EDT 2008

When compiling this file (using Windriver's PPC compiler) the following
warning is given;


dnsglue.c:317: warning: comparison is always false due to limited range
of data type


The line of code causing the problem is;


            if (rdlen > INT_MAX)


Where rdlen has been defined as an unsigned short and INT_MAX is set to


Since rdlen is the length to be read and is set by a call to the
SAFE_GETUINT16 macro, can any value really be considered invalid? 


Especially since the macro INCR_OK is called just before the offendiing
"IF" statement, which verifies that the length is within the ds->anslen.


It might be that rdlen could be set to an int just like ds->anslen which
will resolve the warning, but I'm uncertain as to the validity of that



Dennis Marus

(585)427-5241 / 8*227-5241 (Cube 801-5510-10)

BGO/XOG/SEEDU/ADU/AI (Apps Infrastructure)

Xerox Corporation

Mailstop 0801-80A

1350 Jefferson Road

Rochester, New York 14623

Please Note:

"This e-mail message, including any attachments, is for the sole use of
the intended recipient(s) and may contain confidential information. Any
unauthorized review, use, disclosure or distribution is prohibited. If
you are not the intended recipient(s) please contact the sender by reply
e-mail and destroy all copies of the original message. Finally, the
recipient should check that this email is authentic and examine it for
the presence of viruses. Xerox does perform virus checks but cannot
accept liability for any damage caused by any virus transmitted by this
email. Thank you."


More information about the krbdev mailing list