From 8ea85a4e33fac0e5df05ee0ba96600d0f241ca64 Mon Sep 17 00:00:00 2001 From: Fredrik Tolf Date: Mon, 10 Nov 2014 22:11:28 +0100 Subject: [PATCH] patplex: Fixed segfault bug in pattern replacement. --- src/patplex.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/patplex.c b/src/patplex.c index d0e2dad..9939543 100644 --- a/src/patplex.c +++ b/src/patplex.c @@ -383,12 +383,14 @@ static void qoffsets(char *buf, int *obuf, char *pstr, int unquote) o++; } buf[o] = 0; + obuf[o] = i; } else { for(i = 0; pstr[i]; i++) { buf[i] = pstr[i]; obuf[i] = i; } buf[i] = 0; + obuf[i] = i; } } -- 2.11.0