Currently, ftp/main.c populates xargv from argv, reading the next three items regardless of whether they are defined or not (i.e. regardless of the value of argc as long as it is positive). This may cause undefined behaviour.
This change takes argc into account when populating xargv from argv. This is version 2 of this patch, due to formatting changes. I apologize for spamming. No worries, patches are always nice! Applied. 2017-06-22 Omer Anson <oaan...@gmail.com> (tiny change) * ftp/main.c (main): Don't assume that uninitialized argv[argv] is NULL.