emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/vc-got 7a5ead6 061/145: vc-got-repository-url: avoid in


From: ELPA Syncer
Subject: [elpa] externals/vc-got 7a5ead6 061/145: vc-got-repository-url: avoid infinite loops in parsing
Date: Thu, 9 Sep 2021 15:58:33 -0400 (EDT)

branch: externals/vc-got
commit 7a5ead659d51fa249e2af1fcbf0ad79e969e5204
Author: Omar Polo <op@omarpolo.com>
Commit: Omar Polo <op@omarpolo.com>

    vc-got-repository-url: avoid infinite loops in parsing
    
    add a missing forward-line and make sure we don't try to go past the
    end of the file (another thing that may cause an infinite loop).
---
 vc-got.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/vc-got.el b/vc-got.el
index 8440bf5..f4121be 100755
--- a/vc-got.el
+++ b/vc-got.el
@@ -665,9 +665,11 @@ Value is returned as floating point fractional number of 
days."
         (when (search-forward heading nil t)
           (forward-line)
           (while (and (not found)
-                      (looking-at ".*="))       ;too broad?
+                      (looking-at ".*=") ;too broad?
+                      (not (= (point) (point-max))))
             (when (looking-at ".*url = \\(.*\\)")
-              (setq found (match-string-no-properties 1))))
+              (setq found (match-string-no-properties 1)))
+            (forward-line))
           found)))))
 
 (provide 'vc-got)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]