[packages/newmail] - correctly terminate string

atler atler at pld-linux.org
Wed Oct 3 19:09:42 CEST 2012


commit 33ca74c8fc3183581eb2483bb24179d157501f60
Author: Jan Palus <jan.palus at gmail.com>
Date:   Wed Oct 3 19:08:38 2012 +0200

    - correctly terminate string

 newmail-compile.patch | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/newmail-compile.patch b/newmail-compile.patch
index 786e13e..aefa0ea 100644
--- a/newmail-compile.patch
+++ b/newmail-compile.patch
@@ -1,12 +1,14 @@
+Only in newmail: newmail
 diff -ur newmail.orig/newmail.c newmail/newmail.c
 --- newmail.orig/newmail.c	2012-10-03 18:53:40.534769342 +0200
-+++ newmail/newmail.c	2012-10-03 18:53:56.908013977 +0200
-@@ -126,7 +126,7 @@
++++ newmail/newmail.c	2012-10-03 19:06:27.135159274 +0200
+@@ -126,7 +126,8 @@
        fprintf(stderr, "%s: Only one directory structure allowed. "
            "Using: %s\n", argv[0], argv[optind]);
      }
 -    snprintf(maildirname, sizeof(maildirname), argv[optind]);
 +    strncpy(maildirname, argv[optind], MAXPATHLEN);
++    maildirname[MAXPATHLEN] = '\0';
    } else {
      if (!getenv("HOME")) error_quit("Unable to determine $HOME directory");
      snprintf(maildirname, sizeof(maildirname), "%s/Maildir", getenv("HOME"));
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/newmail.git/commitdiff/33ca74c8fc3183581eb2483bb24179d157501f60



More information about the pld-cvs-commit mailing list