sbase

suckless unix tools
git clone git://git.2f30.org/sbase.git
Log | Files | Refs | README | LICENSE

commit d90ba15f2990d7dc06d7c0c7877079e1f8dd3464
parent fb936d5ba5ae6831dcf42c89ad1a0dce1e338f88
Author: Pieter Kockx <pieterkockx@gmail.com>
Date:   Thu,  7 Sep 2017 19:00:10 +0200

Fix segmentation fault in paste(1)

libutil/unescape received a pointer to a a string in
read-only memory.

Diffstat:
paste.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/paste.c b/paste.c @@ -97,6 +97,7 @@ main(int argc, char *argv[]) break; case 'd': adelim = EARGF(usage()); + unescape(adelim); break; default: usage(); @@ -107,7 +108,6 @@ main(int argc, char *argv[]) /* populate delimiters */ /* TODO: fix libutf to accept sizes */ - unescape(adelim); delim = ereallocarray(NULL, utflen(adelim) + 1, sizeof(*delim)); if (!(delimlen = utftorunestr(adelim, delim))) usage();