jeremy spotted that some 2.5-year-old code, only now used in one place, a
authorLuke Leighton <lkcl@samba.org>
Fri, 17 Mar 2000 20:18:00 +0000 (20:18 +0000)
committerLuke Leighton <lkcl@samba.org>
Fri, 17 Mar 2000 20:18:00 +0000 (20:18 +0000)
function align4, was incorrect.

fascinating :)

source/lib/util.c
source/nmbd/nmbd_processlogon.c

index 9e55e6625170b24aee5f7da84fdd8ef7aec104aa..640b415d7af9dea785b9cd86e0b92e88d9e1ccba 100644 (file)
@@ -2665,7 +2665,7 @@ char *align4(char *q, char *base)
        int mod = PTR_DIFF(q, base) & 3;
        if (mod != 0)
        {
-               q += mod;
+               q += 4-mod;
        }
        return q;
 }
index 338674d8aad295653cfc1f0b7bbf9e4bce8f19a0..3fd817e2e00e67c62c819ed51b65fd1e96049b01 100644 (file)
@@ -222,7 +222,6 @@ reporting %s domain %s 0x%x ntversion=%x lm_nt token=%x lm_20 token=%x\n",
                        if (domainsidsize != 0)
                        {
                                q += domainsidsize;
-                               q += 2;
                                q = align4(q, buf);
                        }