13628 sppptun: array subscript 0 is outside array bounds
Reviewed by: Yuri Pankov <yuripv@yuripv.dev>
Approved by: Gordon Ross <gordon.w.ross@gmail.com>
diff --git a/usr/src/uts/common/io/ppp/sppptun/sppptun_impl.h b/usr/src/uts/common/io/ppp/sppptun/sppptun_impl.h
index 58480ae..ab87995 100644
--- a/usr/src/uts/common/io/ppp/sppptun/sppptun_impl.h
+++ b/usr/src/uts/common/io/ppp/sppptun/sppptun_impl.h
@@ -150,7 +150,7 @@
 };
 
 #define	TO_TLL(p) \
-	((tunll_t *)((caddr_t)(p) - offsetof(tunll_t, tll_next)))
+	((tunll_t *)((uintptr_t)(p) - offsetof(tunll_t, tll_next)))
 
 #define	TLLF_NOTLOWER		0x00000001	/* never set */
 #define	TLLF_CLOSING		0x00000002	/* driver detach initiated */