diff options
author | skv <skv@FreeBSD.org> | 2008-10-04 23:28:05 +0800 |
---|---|---|
committer | skv <skv@FreeBSD.org> | 2008-10-04 23:28:05 +0800 |
commit | 5fd13ddd3c6618fab71d6ee19ba88226f2d2df2d (patch) | |
tree | bc7f5e95037327ed6bd907e2251953eb935a2fd2 /www/p5-ClearSilver/files | |
parent | bbb4b5ce3c99a56624aa632d2162317b52f4c927 (diff) | |
download | freebsd-ports-gnome-5fd13ddd3c6618fab71d6ee19ba88226f2d2df2d.tar.gz freebsd-ports-gnome-5fd13ddd3c6618fab71d6ee19ba88226f2d2df2d.tar.zst freebsd-ports-gnome-5fd13ddd3c6618fab71d6ee19ba88226f2d2df2d.zip |
Bugfixes:
- fix perl_render() - avoid "uninitialized value" warnings
- fix perlcs_parseString() - correct malloc: use len+1 instead of len
Also, take maintainership.
PR: ports/127108
Submitted by: skv
Approved by: rink (previous maintainer)
Diffstat (limited to 'www/p5-ClearSilver/files')
-rw-r--r-- | www/p5-ClearSilver/files/patch-ClearSilver.xs | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/www/p5-ClearSilver/files/patch-ClearSilver.xs b/www/p5-ClearSilver/files/patch-ClearSilver.xs new file mode 100644 index 000000000000..2ba5c15e9977 --- /dev/null +++ b/www/p5-ClearSilver/files/patch-ClearSilver.xs @@ -0,0 +1,34 @@ +--- ClearSilver.xs.orig 2008-10-04 15:16:18.000000000 +0000 ++++ ClearSilver.xs 2008-10-04 15:20:37.000000000 +0000 +@@ -401,7 +401,11 @@ + ClearSilver::CS cs + CODE: + { +- SV *str = newSV(0); ++ SV *str = newSV(1); ++ SvLEN_set(str, 0); ++ SvCUR_set(str, 0); ++ SvPOK_on(str); ++ + cs->err = cs_render(cs->cs, str, output); + if (cs->err == STATUS_OK) { + ST(0) = sv_2mortal(str); +@@ -439,7 +443,7 @@ + CODE: + do { + len = strlen(in_str); +- cs_str = (char *)malloc(len); ++ cs_str = (char *)malloc(len + 1); + if (!cs_str) { + RETVAL = 0; + break; +@@ -448,7 +452,8 @@ + cs->err = cs_parse_string(cs->cs, cs_str, len); + if (cs->err != STATUS_OK) + RETVAL = 0; +- RETVAL = 1; ++ else ++ RETVAL = 1; + } while (0); + OUTPUT: + RETVAL |