DragonFly commits List (threaded) for 2011-10
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
git: DragonFly_RELEASE_2_12 sdiff: fix wcwidth recursion
commit 52416ac24d82da3de053a528a07e89cf1419fbba
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/52416ac24d82da3de053a528a07e89cf1419fbba
--
DragonFly BSD source repository
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]