From: Matthias Koenig <mkoenig@suse.de>
To: Theodore Ts'o <tytso@mit.edu>
Cc: linux-ext4@vger.kernel.org
Subject: [PATCH] libuuid: don't use unitialized variable
Date: Tue, 06 May 2008 13:38:31 +0200 [thread overview]
Message-ID: <n7xhcdbd5mw.fsf@sor.suse.de> (raw)
Hi,
tv is not initialized before the assigment to last.
Signed-Off-By: Matthias Koenig <mkoenig@suse.de>
Index: e2fsprogs-1.40.8/lib/uuid/gen_uuid.c
===================================================================
--- e2fsprogs-1.40.8.orig/lib/uuid/gen_uuid.c
+++ e2fsprogs-1.40.8/lib/uuid/gen_uuid.c
@@ -316,7 +316,7 @@ static int get_clock(uint32_t *clock_hig
if ((last.tv_sec == 0) && (last.tv_usec == 0)) {
get_random_bytes(&clock_seq, sizeof(clock_seq));
clock_seq &= 0x3FFF;
- last = tv;
+ gettimeofday(&last, 0);
last.tv_sec--;
}
next reply other threads:[~2008-05-06 11:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-06 11:38 Matthias Koenig [this message]
2008-05-12 0:41 ` [PATCH] libuuid: don't use unitialized variable Theodore Tso
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=n7xhcdbd5mw.fsf@sor.suse.de \
--to=mkoenig@suse.de \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
/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