Renamed -version switch to -Version to remove the conflict with -verbose.
[mmh] / uip / slocal.c
index b83a268..bd6b0a2 100644 (file)
@@ -63,7 +63,7 @@ static struct swit switches[] = {
 #define DEBUGSW  10
        { "debug", 0 },
 #define VERSIONSW  11
-       { "version", 0 },
+       { "Version", 0 },
 #define HELPSW  12
        { "help", 0 },
        { NULL, 0 }
@@ -1107,6 +1107,7 @@ get_sender(char *envelope, char **sender)
 
        i = strlen("From ");
        strncpy(buffer, envelope + i, sizeof(buffer));
+       buffer[sizeof buffer -1] = '\0';  /* ensure termination */
        if ((cp = strchr(buffer, '\n'))) {
                *cp = '\0';
                cp -= 24;