Subject: | (patch) fix memory leak on alpha/64-bit platforms |
(Forwarded from Doug Larrick <doug@ties.org> from the Debian Bug#195500)
The following patch fixes a problem where applications -- specifically
SpamAssassin -- can fail, printing an "Out of memory!" message on Alpha,
and presumably on other 64-bit platforms.
--- util.c.orig 2003-05-30 21:01:50.000000000 -0400
+++ util.c 2003-05-30 21:01:54.000000000 -0400
@@ -171,12 +171,12 @@
#ifdef UNICODE_ENTITIES
if (!SvUTF8(sv) && repl_utf8) {
- int len = t - SvPVX(sv);
+ STRLEN len = t - SvPVX(sv);
if (len) {
/* need to upgrade the part that we have looked though */
- int old_len = len;
+ STRLEN old_len = len;
char *ustr = bytes_to_utf8(SvPVX(sv), &len);
- int grow = len - old_len;
+ STRLEN grow = len - old_len;
if (grow) {
/* XXX It might already be enough gap, so we don't need this,
but it should not hurt either.
-- System Information:
Debian Release: testing/unstable
Architecture: alpha
Kernel: Linux jekyl 2.4.20 #1 Sat Feb 1 08:55:32 EST 2003 alpha
Locale: LANG=C, LC_CTYPE=C
Versions of packages libhtml-parser-perl depends on:
ii libc6.1 2.3.1-16
ii libhtml-tagset-perl 3.03-1
ii perl 5.8.0-17
ii perl-base [perlapi-5.8.0] 5.8.0-17