freebsd-ports/japanese/p5-Text-Kakasi/files/patch-Kakasi.xs
Akinori MUSHA 0b4fc6a9d6 Fix a bug where the following piece of code causes coredump:
perl -e '
        use Text::Kakasi;
        Text::Kakasi::getopt_argv("kakasi", "-ieuc", "-Ha");
        Text::Kakasi::do_kakasi("\xa1\xb3");
    '

Found by:	GOTO Kentaro <gotoken@notwork.org>
2002-10-05 11:24:29 +00:00

12 lines
254 B
Plaintext

--- Kakasi.xs.orig Wed Apr 11 16:58:38 2001
+++ Kakasi.xs Sat Oct 5 20:20:42 2002
@@ -110,7 +110,7 @@
tmp ++;
cur ++;
}
- free(rtmp);
+ if (*rtmp) free(rtmp);
} while (cur < slen);
if (ret != NULL) {
RETVAL = newSVpv(ret, rcur - 1);