: linux-2.5.31/drivers/telephony/ixj.c
PATCH 1/1 : linux-2.5.31/drivers/telephony/ixj.c
trivial patch to fix the check for following kmalloc size overflow with elements_used (the type being checked and the type being used were different, and of different sizes).
--
Silvio
linux-2.5.31/drivers/telephony/ixj.c renamed from drivers/telephony/ixj.c +1 -1
@@ -5943,7 +5943,7 @@ lcp =kmalloc (sizeof (IXJ_CADENCE ),GFP_KERNEL );if (lcp ==NULL )return -ENOMEM ; -if (copy_from_user (lcp, (char *) cp,sizeof (IXJ_CADENCE )) || (unsigned )lcp->elements_used >= ~0U /sizeof (IXJ_CADENCE ) ) +if (copy_from_user (lcp, (char *) cp,sizeof (IXJ_CADENCE )) || (unsigned )lcp->elements_used >= ~0U /sizeof (IXJ_CADENCE_ELEMENT ) ) {kfree (lcp);return -EFAULT ;