From: Parag Warudkar <parag.warudkar@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: akpm@osdl.org
Subject: Re: [PATCH 2.6.15-rc7] udf/balloc.c : Fix use of uninitialized data
Date: Wed, 28 Dec 2005 12:37:43 -0500 [thread overview]
Message-ID: <82e4877d0512280937k21cc6b68s356093083ef2ce63@mail.gmail.com> (raw)
In-Reply-To: <82e4877d0512280913s66a43d4ida9eda3640520c1@mail.gmail.com>
Forgot to add Signed-off-by - corrected patch follows -
Signed-off-by: Parag Warudkar <parag.warudkar@gmail.com>
Variable goal_eloc is automatic, non-static and initialized conditionally.
The following patch fixes this by initializing the goal_eloc variable to zero.
Hopefully zero should be better than some random data! (Patch also
attached in case of problem with below inline version.) Compile
tested.
--- linux-2.6/fs/udf/balloc.c.orig 2005-12-28 11:53:12.000000000 -0500
+++ linux-2.6/fs/udf/balloc.c 2005-12-28 11:53:19.000000000 -0500
@@ -754,7 +754,8 @@ static int udf_table_new_block(struct su
uint32_t spread = 0xFFFFFFFF, nspread = 0xFFFFFFFF;
uint32_t newblock = 0, adsize;
uint32_t extoffset, goal_extoffset, elen, goal_elen = 0;
- kernel_lb_addr bloc, goal_bloc, eloc, goal_eloc;
+ kernel_lb_addr bloc, goal_bloc, eloc,
+ goal_eloc = { .logicalBlockNum=0, .partitionReferenceNum=0 } ;
struct buffer_head *bh, *goal_bh;
int8_t etype;
next prev parent reply other threads:[~2005-12-28 17:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-28 17:13 Parag Warudkar
2005-12-28 17:37 ` Parag Warudkar [this message]
2005-12-28 18:47 ` Al Viro
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=82e4877d0512280937k21cc6b68s356093083ef2ce63@mail.gmail.com \
--to=parag.warudkar@gmail.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®