Hi Alexander

This diff had some issues for me, namely the chunk below.

:+                       if (line == NULL);


However I did adjust it and came up with this instead, does it also fix
the issue for you?


Index: list.c
===================================================================
RCS file: /cvs/openbsd/src/usr.bin/ftp/list.c,v
retrieving revision 1.3
diff -u -p -u -p -r1.3 list.c
--- list.c      5 May 2009 19:35:30 -0000       1.3
+++ list.c      27 Jun 2010 00:00:06 -0000
@@ -34,6 +34,8 @@ parse_unix(char **line, char *type)
                        *type = *tok;
 
                if (field == 7) {
+                       if (line == NULL || *line == NULL || **line == '\0')
+                               break;
                        while (**line == ' ' || **line == '\t')
                                (*line)++;
                        break;
@@ -58,6 +60,8 @@ parse_windows(char **line, char *type)
                        *type = 'd';
 
                if (field == 2) {
+                       if (line == NULL || *line == NULL || **line == '\0')
+                               break;
                        while (**line == ' ' || **line == '\t')
                                (*line)++;
                        break;


-- 
Q:  What do you do with an elephant with three balls?
A:  Walk him and pitch to the rhino.

Reply via email to