On Mon, Jul 24, 2006 at 01:20:42PM -0400, Michael Schultheiss wrote:
> Frank K?ster wrote:
> > Dear Perl-TK maintainer,
> > 
> > while investigating a segfault with an other perl-tk script in
> > tetex-bin, we found that this old bug has not been fixed, or rather
> > unfixed again:

> With the patch you provided in February, I released an updated perl-tk
> package for Debian.  I've recently received reports that the minimal
> testcase you provided along with your patch is still segfaulting.  I've
> verified that the patch you provided is still applied in the current
> Debian perl-tk package.  Any assistance or suggestions you can provide
> would be greatly appreciated.

Hi,

the attached patch to objGlue.c in perl-tk 1:804.027-5 seems to fix this
for me. I don't claim to understand what has changed since February, but
apparently the same testcase now takes another code path: SvPOK(objPtr)
is now false, when it was true back then. Anyway, this additional NULL
check is clearly needed as well.

I'm currently quite busy in RL, so I can't dig into this quite properly;
hope there aren't many more of these left :)

Cheers,
-- 
Niko Tyni       [EMAIL PROTECTED]
--- perl-tk-804.027/objGlue.c
+++ perl-tk-804.027/objGlue.c
@@ -529,6 +529,10 @@
       sv_utf8_upgrade(objPtr);
 #endif
      s = SvPV(objPtr, len);
+     if (!s)
+      {
+       return NULL;
+      }
 #ifdef SvUTF8
      if (!is_utf8_string(s,len))
       {

Reply via email to