[commit: packages/directory] master: Remove dependence on the C bits entirely and fix realpath bug (3177ec4)

git at git.haskell.org git at git.haskell.org
Fri Dec 18 09:51:15 UTC 2015


Repository : ssh://git@git.haskell.org/directory

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/3177ec458d2bc6906755b57ecabf3a5f67c02320/directory

>---------------------------------------------------------------

commit 3177ec458d2bc6906755b57ecabf3a5f67c02320
Author: Phil Ruffwind <rf at rufflewind.com>
Date:   Mon Jun 1 23:48:40 2015 -0400

    Remove dependence on the C bits entirely and fix realpath bug
    
    The directory package itself no longer depends on the C bits
    (cbits/directory.c, include/HsDirectory.h), but they will remain for
    backward compatibility.
    
    This also fixes the potential buffer overflow that can occur in realpath
    when PATH_MAX is absent.  Newer versions of POSIX support realpath with
    NULL as the second argument, in which case the result is dynamically
    allocated by the OS and may be freed using 'free'.  (The hope is that
    older systems that don't support this feature would be kind enough to
    provide a PATH_MAX, at least.)


>---------------------------------------------------------------

3177ec458d2bc6906755b57ecabf3a5f67c02320
 System/Directory.hs                       | 32 ++++-------------------
 System/Directory/Internal.hsc             | 18 +++++++++----
 System/Directory/Internal/C_utimensat.hsc | 17 ++++++++-----
 System/Directory/Internal/Posix.hsc       | 42 +++++++++++++++++++++++++++++++
 System/Directory/Internal/Windows.hsc     | 23 +++++++++++++++++
 configure.ac                              |  4 ++-
 directory.cabal                           |  2 ++
 7 files changed, 99 insertions(+), 39 deletions(-)

Diff suppressed because of size. To see it, use:

    git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 3177ec458d2bc6906755b57ecabf3a5f67c02320


More information about the ghc-commits mailing list