fix attributes memcmp without len<6 (asan catch)
authorReini Urban <rurban@x-ray.at>
Tue, 7 Oct 2014 04:44:27 +0000 (15:44 +1100)
committerTony Cook <tony@develop-help.com>
Tue, 7 Oct 2014 23:18:45 +0000 (10:18 +1100)
ext/attributes/attributes.pm
ext/attributes/attributes.xs

index ebca214..6ca9ce5 100644 (file)
@@ -1,6 +1,6 @@
 package attributes;
 
-our $VERSION = 0.23;
+our $VERSION = 0.24;
 
 @EXPORT_OK = qw(get reftype);
 @EXPORT = ();
index 6b36812..c131734 100644 (file)
@@ -97,7 +97,7 @@ modify_SV_attributes(pTHX_ SV *sv, SV **retlist, SV **attrlist, int numattrs)
            }
            break;
        default:
-           if (memEQs(name, len, "shared")) {
+           if (len == 6 && memEQs(name, len, "shared")) {
                        if (negated)
                            Perl_croak(aTHX_ "A variable may not be unshared");
                        SvSHARE(sv);