public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] libuuid: don't use unitialized variable
@ 2008-05-06 11:38 Matthias Koenig
  2008-05-12  0:41 ` Theodore Tso
  0 siblings, 1 reply; 2+ messages in thread
From: Matthias Koenig @ 2008-05-06 11:38 UTC (permalink / raw)
  To: Theodore Ts'o; +Cc: linux-ext4

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--;
 	}
 



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] libuuid: don't use unitialized variable
  2008-05-06 11:38 [PATCH] libuuid: don't use unitialized variable Matthias Koenig
@ 2008-05-12  0:41 ` Theodore Tso
  0 siblings, 0 replies; 2+ messages in thread
From: Theodore Tso @ 2008-05-12  0:41 UTC (permalink / raw)
  To: Matthias Koenig; +Cc: linux-ext4

On Tue, May 06, 2008 at 01:38:31PM +0200, Matthias Koenig wrote:
> Hi,
> 
> tv is not initialized before the assigment to last.
> 
> Signed-Off-By: Matthias Koenig <mkoenig@suse.de>

Thanks, applied.

						- Ted

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-05-12  3:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-06 11:38 [PATCH] libuuid: don't use unitialized variable Matthias Koenig
2008-05-12  0:41 ` Theodore Tso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox