New comment by shahab-vahedi on void-packages repository https://github.com/void-linux/void-packages/pull/26861#issuecomment-736564215 Comment: > Would you mind using the patch directly from fedora? Fedora's patch is not readily usable: ``` => expect-5.45.4_3: patching: 0004-cross-misc.patch. => expect-5.45.4_3: patching: 0005-fix-buf-overflow-when-logging.patch. The text leading up to this was: -------------------------- |diff -up expect5.45/exp_log.c.orig expect5.45/exp_log.c |--- expect5.45/exp_log.c.orig 2013-12-12 12:43:38.527854189 +0100 |+++ expect5.45/exp_log.c 2013-12-12 12:49:26.866576387 +0100 -------------------------- File to patch: Skip this patch? [y] 4 out of 4 hunks ignored => ERROR: expect-5.45.4_3: do-patch_00-patches: 'patch -sl ${_args} -i ${_patch} 2> /dev/null' exited with 1 => ERROR: in _process_patch() at common/hooks/do-patch/00-patches.sh:34 => ERROR: in hook() at common/hooks/do-patch/00-patches.sh:51 => ERROR: in run_func() at common/xbps-src/shutils/common.sh:21 => ERROR: in run_pkg_hooks() at common/xbps-src/shutils/common.sh:245 => ERROR: in run_step() at common/xbps-src/shutils/common.sh:71 => ERROR: in main() at common/xbps-src/libexec/xbps-src-dopatch.sh:33 ``` > Also, using `vsnprintf` means you can lose information, even if it avoids the buffer overflows... If one doesn't one to lose the data, then the `bigbuf` should be handled dynamically. That would be a more error-prone patch than this one. Given a `*** buffer overflow detected ***: expect terminated`, I think loosing the data at offsets _2000+_ should be OK.