Skip Menu |

This queue is for tickets about the ExtUtils-Typemaps-Default CPAN distribution.

Report information
The Basics
Id: 91213
Status: resolved
Priority: 0/
Queue: ExtUtils-Typemaps-Default

People
Owner: Nobody in particular
Requestors: james2vegas [...] aim.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



Subject: Mapping STL containers to array tries to extend the AV to (0 - 1) elements when the container is empty.
Mapping an empty STL container to an array calls av_extend with a key of container.size(0) - 1 which can cause an out of memory error.

        const unsigned int len = $var.size();
        av_extend(av, len-1);

should be

        const unsigned int len = $var.size();
        if (len > 0)
            av_extend(av, len-1);

 


Thank you very much for reporting this. Embarrassing mistake! The bug is fixed in the 1.05 release that just entered PAUSE. Best regards, Steffen