[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gobolinux-commits
Subject:    [gobolinux-commits] r3269 - trunk/Scripts/src
From:       mwh () svn ! gobolinux ! org
Date:       2008-04-30 10:00:50
Message-ID: 20080430100050.6648A81AD () oakdale ! dreamhost ! com
[Download RAW message or body]

Author: mwh
Date: 2008-04-30 03:00:50 -0700 (Wed, 30 Apr 2008)
New Revision: 3269

Modified:
   trunk/Scripts/src/CommandNotFound.c
Log:
Fix infinite loop when target is beyond the end of the list of executables

Modified: trunk/Scripts/src/CommandNotFound.c
===================================================================
--- trunk/Scripts/src/CommandNotFound.c	2008-04-30 09:59:11 UTC (rev 3268)
+++ trunk/Scripts/src/CommandNotFound.c	2008-04-30 10:00:50 UTC (rev 3269)
@@ -66,7 +66,7 @@
 		fgets(entry, BUFLEN, fp);
 	// Perform a linear search from here to the upper bound of the range, and
 	// hand off to foundexecutable() if the target is found.
-	while (ftell(fp) <= hi) {
+	while (ftell(fp) < hi) {
 		fgets(entry, BUFLEN, fp);
 		executable = strtok(entry, " ");
 		if (strcmp(executable, target) == 0)

_______________________________________________
gobolinux-commits mailing list
gobolinux-commits@lists.gobolinux.org
http://lists.gobolinux.org/mailman/listinfo/gobolinux-commits
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic