[PATCH 1/3] pulsecore: Fix assert in pa_msgobject creation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Allows for creation of derived types that don't have any other fields.
---
 src/pulsecore/msgobject.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/pulsecore/msgobject.c b/src/pulsecore/msgobject.c
index 075a28c..b55ba8b 100644
--- a/src/pulsecore/msgobject.c
+++ b/src/pulsecore/msgobject.c
@@ -31,7 +31,7 @@ PA_DEFINE_PUBLIC_CLASS(pa_msgobject, pa_object);
 pa_msgobject *pa_msgobject_new_internal(size_t size, const char *type_id, pa_bool_t (*check_type)(const char *type_name)) {
     pa_msgobject *o;
 
-    pa_assert(size > sizeof(pa_msgobject));
+    pa_assert(size >= sizeof(pa_msgobject));
     pa_assert(type_id);
 
     if (!check_type)
-- 
1.8.2.1



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux