]> granicus.if.org Git - mutt/commitdiff
Use PATH_MAX for buffers passed to realpath(3) as we're supposed to
authorMiroslav Lichvar <mlichvar@redhat.com>
Wed, 1 Apr 2009 12:33:35 +0000 (14:33 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Wed, 1 Apr 2009 12:33:35 +0000 (14:33 +0200)
hcache.c
muttlib.c

index ece4ca9f45800a7fd9aba5e678d5eecf9ec3451d..4bcaeb001a6475c4f6bff48cf8fff9831a1190d0 100644 (file)
--- a/hcache.c
+++ b/hcache.c
@@ -836,7 +836,7 @@ static char* get_foldername(const char *folder) {
    * to ensure equivalent paths share the hcache */
   if (stat (folder, &st) == 0)
   {
-    p = safe_malloc (_POSIX_PATH_MAX+1);
+    p = safe_malloc (PATH_MAX+1);
     if (!realpath (folder, p))
       mutt_str_replace (&p, folder);
   } else
index f8f99becf6e557cb3cd56841256db84c3c5bd96b..a031941cc2e80eaf96f12134690348f75d00e24a 100644 (file)
--- a/muttlib.c
+++ b/muttlib.c
@@ -759,7 +759,7 @@ void mutt_pretty_mailbox (char *s, size_t buflen)
   char *p = s, *q = s;
   size_t len;
   url_scheme_t scheme;
-  char tmp[_POSIX_PATH_MAX];
+  char tmp[PATH_MAX];
 
   scheme = url_check_scheme (s);