DragonFlyBSD Kernel Audit
DF-0825 / fix.diff
← back to finding ↓ download raw
diff --git a/sys/vfs/nfs/nfs_syscalls.c b/sys/vfs/nfs/nfs_syscalls.c
--- a/sys/vfs/nfs/nfs_syscalls.c
+++ b/sys/vfs/nfs/nfs_syscalls.c
@@ -1113,8 +1113,8 @@
 	TAILQ_INSERT_TAIL(&nmp->nm_uidlruhead, nuidp, nu_lru);
 
 	nickp = (u_int32_t *)kmalloc(2 * NFSX_UNSIGNED, M_TEMP, M_WAITOK);
-	*nickp++ = txdr_unsigned(RPCAKN_NICKNAME);
-	*nickp = txdr_unsigned(nuidp->nu_nickname);
+	nickp[0] = txdr_unsigned(RPCAKN_NICKNAME);
+	nickp[1] = txdr_unsigned(nuidp->nu_nickname);
 	*auth_str = (char *)nickp;
 	*auth_len = 2 * NFSX_UNSIGNED;