tags 758580 + patch

Dear maintainer,

I have prepared a patch for luabind (versioned as 0.9.1+dfsg-9.1).
I created this patch hoping it might be helpful, should you decide
to implement the contained changes.

Kind Regards,
Andreas Grob
diff -Nru luabind-0.9.1+dfsg/debian/changelog luabind-0.9.1+dfsg/debian/changelog
--- luabind-0.9.1+dfsg/debian/changelog	2014-08-10 01:03:42.000000000 +0200
+++ luabind-0.9.1+dfsg/debian/changelog	2014-08-20 09:08:22.000000000 +0200
@@ -1,3 +1,10 @@
+luabind (0.9.1+dfsg-9.1) UNRELEASED; urgency=low
+
+  * Non-maintainer upload.
+  * Fix dereference of null pointer in adopt_policy.hpp (Closes: #758580)
+
+ -- Andreas Grob <vilar...@illarion.org>  Wed, 20 Aug 2014 09:05:11 +0200
+
 luabind (0.9.1+dfsg-9) unstable; urgency=low
 
   * Change Build-Depends from "libboost1.54-all-dev | libboost1.55-all-dev |
diff -Nru luabind-0.9.1+dfsg/debian/patches/11_fix_null_pointer_dereference.patch luabind-0.9.1+dfsg/debian/patches/11_fix_null_pointer_dereference.patch
--- luabind-0.9.1+dfsg/debian/patches/11_fix_null_pointer_dereference.patch	1970-01-01 01:00:00.000000000 +0100
+++ luabind-0.9.1+dfsg/debian/patches/11_fix_null_pointer_dereference.patch	2014-08-20 08:49:42.000000000 +0200
@@ -0,0 +1,18 @@
+Description: Fix null pointer dereference in adopt_policy.hpp
+Author: Andreas Grob <vilar...@illarion.org>
+Bug-Debian: http://bugs.debian.org/758580
+--- a/luabind/adopt_policy.hpp
++++ b/luabind/adopt_policy.hpp
+@@ -65,7 +65,11 @@
+ 
+             object_rep* obj = static_cast<object_rep*>(
+                 lua_touserdata(L, index));
+-            obj->release();
++
++            if (obj)
++            {
++                obj->release();
++            }
+ 
+             adjust_backref_ownership(ptr, boost::is_polymorphic<T>());
+ 
diff -Nru luabind-0.9.1+dfsg/debian/patches/series luabind-0.9.1+dfsg/debian/patches/series
--- luabind-0.9.1+dfsg/debian/patches/series	2014-08-10 01:03:42.000000000 +0200
+++ luabind-0.9.1+dfsg/debian/patches/series	2014-08-20 08:39:19.000000000 +0200
@@ -8,3 +8,4 @@
 08_support_for_Lua_5.2.patch
 09_build_system_support_for_Lua_5.2.patch
 10_remove_refs_to_remote_images.patch
+11_fix_null_pointer_dereference.patch

Reply via email to