DragonFly BSD
DragonFly commits List (threaded) for 2011-10
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

git: sdiff: fix wcwidth recursion


From: John Marino <marino@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 12 Oct 2011 17:07:10 -0700 (PDT)

commit d76863bd1dbf9c1e4c04a977e3a7271a23cdb718
Author: John Marino <draco@marino.st>
Date:   Thu Oct 13 00:39:51 2011 +0200

    sdiff: fix wcwidth recursion
    
    Apparently trying to diff non-UTF8 documents caused a stack overflow.
    The culprit was correctly identified by Yonetani as the redefinition
    of wcwidth in the wcwidth.c file.  Within that function, it calls itself
    recursively forever.  I'm not sure how this would work differently
    (macro or not) on another system.
    
    My solution was to stop redefining wcwidth and just create a separate
    function, one that will call the system wcwidth function as needed.
    
    reported by: Peter Avalos
    http://bugs.dragonflybsd.org/issue2134

Summary of changes:
 contrib/diffutils/README.DRAGONFLY          |    9 +++++----
 contrib/diffutils/lib/wcwidth.c             |    4 ++--
 contrib/diffutils/src/side.c                |    3 ++-
 gnu/usr.bin/diff/libdiffutils/gnuwidechar.h |   11 +++++++++++
 4 files changed, 20 insertions(+), 7 deletions(-)
 create mode 100644 gnu/usr.bin/diff/libdiffutils/gnuwidechar.h

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/d76863bd1dbf9c1e4c04a977e3a7271a23cdb718


-- 
DragonFly BSD source repository



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]