Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 May 2009 20:02:38 +1000
From:      Mark Andrews <Mark_Andrews@isc.org>
To:        FreeBSD-gnats-submit@freebsd.org, freebsd-ports-bugs@freebsd.org
Subject:   Re: ports/134526: misc/e2fsprogs-libuuid-1.41.5 infinite loop [patch] 
Message-ID:  <200905141002.n4EA2cRm064565@drugs.dv.isc.org>
In-Reply-To: Your message of "Thu, 14 May 2009 08:20:02 GMT." <200905140820.n4E8K2Nc015358@freefall.freebsd.org> 

next in thread | previous in thread | raw e-mail | index | archive | help

	I just realised left a perror() call in that patch.  
	Corrected patch.

	Mark

--- lib/uuid/gen_uuid.c.orig	2009-04-16 03:12:25.000000000 +1000
+++ lib/uuid/gen_uuid.c	2009-05-14 19:55:07.000000000 +1000
@@ -423,6 +423,8 @@
 	memset(buf, 0, count);
 	while (count > 0) {
 		ret = read(fd, buf, count);
+		if (ret == 0)
+			return c;
 		if (ret < 0) {
 			if ((errno == EAGAIN) || (errno == EINTR))
 				continue;
-- 
Mark Andrews, ISC
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742                 INTERNET: Mark_Andrews@isc.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905141002.n4EA2cRm064565>