]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Fix a harmless DNS glue macro bug
authorWill Fiveash <will.fiveash@oracle.com>
Fri, 21 Mar 2014 16:46:08 +0000 (12:46 -0400)
committerGreg Hudson <ghudson@mit.edu>
Fri, 21 Mar 2014 19:58:17 +0000 (15:58 -0400)
The definition of SAFE_GETUINT16 mistakenly uses "p" instead its ptr
parameter in three places, which happens to work because all current
invocations of the macro use "p" as the ptr argument.  Fix it to
correctly use the ptr parameter.

[ghudson@mit.edu: commit message]

ticket: 6845

src/lib/krb5/os/dnsglue.h

index 2f9192faf08ccbdc797bb12fea3ea650c7704bb7..5ab0ad8159078108f6860460b6cd1dcf5772917e 100644 (file)
 #define SAFE_GETUINT16(base, max, ptr, incr, s, label)  \
     do {                                                \
         if (!INCR_OK(base, max, ptr, incr)) goto label; \
-        (s) = (unsigned short)(p)[0] << 8               \
-            | (unsigned short)(p)[1];                   \
-        (p) += (incr);                                  \
+        (s) = (unsigned short)(ptr)[0] << 8             \
+            | (unsigned short)(ptr)[1];                 \
+        (ptr) += (incr);                                \
     } while (0)
 
 struct krb5int_dns_state;