From: brijesh.singh@calsoftinc.com
To: linux-mtd@lists.infradead.org
Subject: Signed Unsigned multiplication in io.c
Date: Thu, 5 Jul 2007 15:07:35 +0530 (IST) [thread overview]
Message-ID: <41876.172.16.0.34.1183628255.squirrel@webmail.calsoftinc.com> (raw)
There is signed multiplication assigned to unsigned ei.addr in io.c.
This causes wrong addresses for big multiplication.This patch solves the
problem.
Signed-off-by: Brijesh Singh <brijesh.s.singh@gmail.com>
Index: mtd-2.6/drivers/mtd/ubi/io.c
===================================================================
--- mtd-2.6.orig/drivers/mtd/ubi/io.c 2007-07-05 13:53:21.000000000 +0530
+++ mtd-2.6/drivers/mtd/ubi/io.c 2007-07-05 14:05:40.000000000 +0530
@@ -298,7 +298,7 @@
memset(&ei, 0, sizeof(struct erase_info));
ei.mtd = ubi->mtd;
- ei.addr = pnum * ubi->peb_size;
+ ei.addr = (loff_t)pnum * ubi->peb_size;
ei.len = ubi->peb_size;
ei.callback = erase_callback;
ei.priv = (unsigned long)&wq;
next reply other threads:[~2007-07-05 9:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-05 9:37 brijesh.singh [this message]
2007-07-05 10:42 ` Signed Unsigned multiplication in io.c Artem Bityutskiy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=41876.172.16.0.34.1183628255.squirrel@webmail.calsoftinc.com \
--to=brijesh.singh@calsoftinc.com \
--cc=linux-mtd@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox