[augeas-devel] augeas: master - * src/fa.c (parse_int): flag not parsing anything as an error

David Lutterkort lutter at fedoraproject.org
Tue Feb 9 18:05:56 UTC 2010


Gitweb:        http://git.fedorahosted.org/git/augeas.git?p=augeas.git;a=commitdiff;h=901dc5608139ccefaa402e67798e824f0d40b8e2
Commit:        901dc5608139ccefaa402e67798e824f0d40b8e2
Parent:        00459b6074d8296deea7328651b029548165c7ea
Author:        David Lutterkort <lutter at redhat.com>
AuthorDate:    Sat Jan 23 20:30:47 2010 -0800
Committer:     David Lutterkort <lutter at redhat.com>
CommitterDate: Mon Feb 8 16:54:43 2010 -0800

* src/fa.c (parse_int): flag not parsing anything as an error

---
 src/fa.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/fa.c b/src/fa.c
index b3f56d0..43ecc5e 100644
--- a/src/fa.c
+++ b/src/fa.c
@@ -3285,6 +3285,8 @@ static int parse_int(struct re_parse *parse) {
         free(s);
     }
 
+    if (used == 0)
+        return -1;
     parse->rx += used;
     if ((l<0) || (l > INT_MAX)) {
         parse->error = REG_BADBR;




More information about the augeas-devel mailing list