Posting on request of Marc Lehmann. Could somebody explain into which unfortunate trap Marc has fallen? I know what a torture it is to be locked out (I myself came across ftp servers that didn't accept "k@" as an anon password, don't ask where) and we should take some care to enable Marc as a poster. -- andreas ----- Start forwarded message (headers trimmed) ----- Date: Mon, 30 Oct 2000 06:54:39 +0100 From: Marc Lehmann <pcg@goof.com> To: andreas.koenig@anima.de Subject: koenntest du was fuer mich auf perl5-porters posten? danke! Message-ID: <20001030065439.D31377@cerebro.laendle> Ich habe eine Bitte, koenntest du diese (meine letzte) mail an perl5-porters schicken, ich kanns leider nicht selber... DANKE! just fyi: this will be my last posting/patch/comment for perl, since "(perl5-porters|perlbug)@perl.(org|com)" all censor my mails because "we choose not to receive mail from you" and, frankly, I will finally follow this advice, simply because I see no way of posting to any of these addresses and obviously help, feedback, bugreports or patches by me are not _wanted_ :( Subject: memory corruption in Perl_utf8_to_bytes [PATCH] Perl_utf8_to_bytes appends a zero byte to the end of the destination area. This is neither documented nor expected by it's callers (and causes utf8_downgrade to overwrite memory). Since Perl_utf8_to_bytes is more versatile when not appending a zero byte, I just removed the assignment and encounter no segfaults anymore ;) Patch below utf8_to_bytes: do not append a zero byte after copying (so source always fits into destination) --- utf8.c.old Mon Oct 30 04:38:09 2000 +++ utf8.c Mon Oct 30 04:38:17 2000 @@ -426,7 +426,6 @@ s += ulen; } } - *d = '\0'; *len = d - save; return save; } -- -----==- | ----==-- _ | ---==---(_)__ __ ____ __ Marc Lehmann +-- --==---/ / _ \/ // /\ \/ / pcg@opengroup.org |e| -=====/_/_//_/\_,_/ /_/\_\ XX11-RIPE --+ The choice of a GNU generation | | ----- End forwarded message -----Thread Next