[balsa/gtk3] Use sscanf field limits



commit 5a8a46e0fd43ba2414257558040639ed49003039
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Sun Jul 22 15:17:22 2012 -0400

    Use sscanf field limits
    
    	* libbalsa/imap/pop3.c (parse_list_response): use sscanf field
    	limits.

 ChangeLog            |    5 +++++
 libbalsa/imap/pop3.c |    2 +-
 2 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index e8b784a..d7896ad 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2012-07-22  Peter Bloomfield
 
+	* libbalsa/imap/pop3.c (parse_list_response): use sscanf field
+	limits.
+
+2012-07-22  Peter Bloomfield
+
 	* libbalsa/imap/imap_tst.c (get_user), (user_cb): reduce scope
 	of variables.
 
diff --git a/libbalsa/imap/pop3.c b/libbalsa/imap/pop3.c
index 72fabc3..cf5d76c 100644
--- a/libbalsa/imap/pop3.c
+++ b/libbalsa/imap/pop3.c
@@ -475,7 +475,7 @@ parse_list_response(PopHandle *pop, char *line, ssize_t sz, GError **err)
       }
       if(line[0]=='.' && (line[1] == '\r' || line[1] == '\n'))
         break;
-      if( sscanf(line, "%u%u", &msg, &msg_size) < 2 ) {
+      if( sscanf(line, "%10u%10u", &msg, &msg_size) < 2 ) {
         g_set_error(err, IMAP_ERROR, IMAP_POP_PROTOCOL_ERROR,
                     "Server %s did not response correctly to LIST: %s",
                     pop->host, line);



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