* [PATCH TRIVIAL]: linux-2.5.31/drivers/telephony/ixj.c
@ 2002-08-22 17:49 Silvio Cesare
0 siblings, 0 replies; only message in thread
From: Silvio Cesare @ 2002-08-22 17:49 UTC (permalink / raw)
To: linux-kernel; +Cc: silvio
[-- Attachment #1: Type: text/plain, Size: 186 bytes --]
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
[-- Attachment #2: patch.2.5.31.ixj --]
[-- Type: text/plain, Size: 655 bytes --]
diff -u linux-2.5.31/drivers/telephony/ixj.c dev/linux-2.5.31/drivers/telephony/ixj.c
--- linux-2.5.31/drivers/telephony/ixj.c Sat Aug 10 18:41:18 2002
+++ dev/linux-2.5.31/drivers/telephony/ixj.c Thu Aug 22 10:45:51 2002
@@ -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;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-08-22 19:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-08-22 17:49 [PATCH TRIVIAL]: linux-2.5.31/drivers/telephony/ixj.c Silvio Cesare
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox