Merge pull request #951 from fabzzap/master

Check whether *value is indeed an SvRV before casting it
This commit is contained in:
unbit
2015-07-01 06:11:49 +02:00
+1 -1
View File
@@ -285,7 +285,7 @@ nonworker:
uwsgi_log("[perl] WARNING !!! unable to build uwsgi::opt hash !!!\n");
goto end;
}
if (SvTYPE(SvRV(*value)) == SVt_PVAV) {
if (SvROK(*value) && SvTYPE(SvRV(*value)) == SVt_PVAV) {
if (uwsgi.exported_opts[i]->value == NULL) {
av_push((AV *)SvRV(*value), newSViv(1));
}