Merge branch 'tizen' into tizen_5.5_tv submit/tizen_5.5_tv/20200318.060947
authorJusung Son <jusung07.son@samsung.com>
Wed, 18 Mar 2020 06:08:51 +0000 (15:08 +0900)
committerJusung Son <jusung07.son@samsung.com>
Wed, 18 Mar 2020 06:08:51 +0000 (15:08 +0900)
packaging/rpc-port.spec
src/rpc-port-parcel.cc
src/rpc-port.cc

index f45d5e1..8d4975a 100644 (file)
@@ -1,6 +1,6 @@
 Name:       rpc-port
 Summary:    RPC Port library
-Version:       1.3.30
+Version:       1.3.31
 Release:    0
 Group:         Application Framework/Libraries
 License:    Apache-2.0
index 8ce15d3..38b158b 100644 (file)
@@ -173,7 +173,7 @@ RPC_API int rpc_port_parcel_write_double(rpc_port_parcel_h h, double d) {
 }
 
 RPC_API int rpc_port_parcel_write_string(rpc_port_parcel_h h, const char* str) {
-  if (h == nullptr)
+  if (h == nullptr || str == nullptr)
     return RPC_PORT_ERROR_INVALID_PARAMETER;
 
   Parcel* p = static_cast<Parcel*>(h);
@@ -195,7 +195,7 @@ RPC_API int rpc_port_parcel_write_bool(rpc_port_parcel_h h, bool b) {
 }
 
 RPC_API int rpc_port_parcel_write_bundle(rpc_port_parcel_h h, bundle* b) {
-  if (h == nullptr)
+  if (h == nullptr || b == nullptr)
     return RPC_PORT_ERROR_INVALID_PARAMETER;
 
   Parcel* p = static_cast<Parcel*>(h);
@@ -221,7 +221,7 @@ RPC_API int rpc_port_parcel_write(rpc_port_parcel_h h,
   if (parcelable == nullptr || parcelable->to == nullptr)
     return RPC_PORT_ERROR_INVALID_PARAMETER;
 
-  if (h == nullptr)
+  if (h == nullptr || data == nullptr)
     return RPC_PORT_ERROR_INVALID_PARAMETER;
 
   parcelable->to(h, data);
@@ -230,7 +230,7 @@ RPC_API int rpc_port_parcel_write(rpc_port_parcel_h h,
 }
 
 RPC_API int rpc_port_parcel_read_byte(rpc_port_parcel_h h, char* b) {
-  if (h == nullptr)
+  if (h == nullptr || b == nullptr)
     return RPC_PORT_ERROR_INVALID_PARAMETER;
 
   Parcel* p = static_cast<Parcel*>(h);
@@ -241,7 +241,7 @@ RPC_API int rpc_port_parcel_read_byte(rpc_port_parcel_h h, char* b) {
 }
 
 RPC_API int rpc_port_parcel_read_int16(rpc_port_parcel_h h, short* i) {
-  if (h == nullptr)
+  if (h == nullptr || i == nullptr)
     return RPC_PORT_ERROR_INVALID_PARAMETER;
 
   Parcel* p = static_cast<Parcel*>(h);
@@ -252,7 +252,7 @@ RPC_API int rpc_port_parcel_read_int16(rpc_port_parcel_h h, short* i) {
 }
 
 RPC_API int rpc_port_parcel_read_int32(rpc_port_parcel_h h, int* i) {
-  if (h == nullptr)
+  if (h == nullptr || i == nullptr)
     return RPC_PORT_ERROR_INVALID_PARAMETER;
 
   Parcel* p = static_cast<Parcel*>(h);
@@ -263,7 +263,7 @@ RPC_API int rpc_port_parcel_read_int32(rpc_port_parcel_h h, int* i) {
 }
 
 RPC_API int rpc_port_parcel_read_int64(rpc_port_parcel_h h, long long* i) {
-  if (h == nullptr)
+  if (h == nullptr || i == nullptr)
     return RPC_PORT_ERROR_INVALID_PARAMETER;
 
   Parcel* p = static_cast<Parcel*>(h);
@@ -274,7 +274,7 @@ RPC_API int rpc_port_parcel_read_int64(rpc_port_parcel_h h, long long* i) {
 }
 
 RPC_API int rpc_port_parcel_read_float(rpc_port_parcel_h h, float* f) {
-  if (h == nullptr)
+  if (h == nullptr || f == nullptr)
     return RPC_PORT_ERROR_INVALID_PARAMETER;
 
   Parcel* p = static_cast<Parcel*>(h);
@@ -285,7 +285,7 @@ RPC_API int rpc_port_parcel_read_float(rpc_port_parcel_h h, float* f) {
 }
 
 RPC_API int rpc_port_parcel_read_double(rpc_port_parcel_h h, double* d) {
-  if (h == nullptr)
+  if (h == nullptr || d == nullptr)
     return RPC_PORT_ERROR_INVALID_PARAMETER;
 
   Parcel* p = static_cast<Parcel*>(h);
@@ -296,7 +296,7 @@ RPC_API int rpc_port_parcel_read_double(rpc_port_parcel_h h, double* d) {
 }
 
 RPC_API int rpc_port_parcel_read_string(rpc_port_parcel_h h, char** str) {
-  if (h == nullptr)
+  if (h == nullptr || str == nullptr)
     return RPC_PORT_ERROR_INVALID_PARAMETER;
 
   Parcel* p = static_cast<Parcel*>(h);
@@ -307,7 +307,7 @@ RPC_API int rpc_port_parcel_read_string(rpc_port_parcel_h h, char** str) {
 }
 
 RPC_API int rpc_port_parcel_read_bool(rpc_port_parcel_h h, bool* b) {
-  if (h == nullptr)
+  if (h == nullptr || b == nullptr)
     return RPC_PORT_ERROR_INVALID_PARAMETER;
 
   Parcel* p = static_cast<Parcel*>(h);
@@ -318,7 +318,7 @@ RPC_API int rpc_port_parcel_read_bool(rpc_port_parcel_h h, bool* b) {
 }
 
 RPC_API int rpc_port_parcel_read_bundle(rpc_port_parcel_h h, bundle** b) {
-  if (h == nullptr)
+  if (h == nullptr || b == nullptr)
     return RPC_PORT_ERROR_INVALID_PARAMETER;
 
   Parcel* p = static_cast<Parcel*>(h);
@@ -330,7 +330,7 @@ RPC_API int rpc_port_parcel_read_bundle(rpc_port_parcel_h h, bundle** b) {
 }
 
 RPC_API int rpc_port_parcel_read_array_count(rpc_port_parcel_h h, int* count) {
-  if (h == nullptr)
+  if (h == nullptr || count == nullptr)
     return RPC_PORT_ERROR_INVALID_PARAMETER;
 
   Parcel* p = static_cast<Parcel*>(h);
@@ -345,7 +345,7 @@ RPC_API int rpc_port_parcel_read(rpc_port_parcel_h h,
   if (parcelable == nullptr || parcelable->from == nullptr)
     return RPC_PORT_ERROR_INVALID_PARAMETER;
 
-  if (h == nullptr)
+  if (h == nullptr || data == nullptr)
     return RPC_PORT_ERROR_INVALID_PARAMETER;
 
   parcelable->from(h, data);
@@ -355,7 +355,7 @@ RPC_API int rpc_port_parcel_read(rpc_port_parcel_h h,
 
 RPC_API int rpc_port_parcel_burst_read(rpc_port_parcel_h h, unsigned char *buf,
     unsigned int size) {
-  if (h == nullptr)
+  if (h == nullptr || buf == nullptr)
     return RPC_PORT_ERROR_INVALID_PARAMETER;
 
   Parcel* p = static_cast<Parcel*>(h);
@@ -367,7 +367,7 @@ RPC_API int rpc_port_parcel_burst_read(rpc_port_parcel_h h, unsigned char *buf,
 
 RPC_API int rpc_port_parcel_burst_write(rpc_port_parcel_h h,
     const unsigned char *buf, unsigned int size) {
-  if (h == nullptr)
+  if (h == nullptr || buf == nullptr)
     return RPC_PORT_ERROR_INVALID_PARAMETER;
 
   Parcel* p = static_cast<Parcel*>(h);
index 0614b76..97125c5 100644 (file)
@@ -177,7 +177,7 @@ class StubExt : public Stub, public Stub::IEventListener {
 }  // namespace
 
 RPC_API int rpc_port_read(rpc_port_h h, void* buf, unsigned int size) {
-  if (h == nullptr)
+  if (h == nullptr || buf == nullptr)
     return RPC_PORT_ERROR_INVALID_PARAMETER;
 
   auto port = static_cast<Port*>(h);
@@ -186,7 +186,7 @@ RPC_API int rpc_port_read(rpc_port_h h, void* buf, unsigned int size) {
 }
 
 RPC_API int rpc_port_write(rpc_port_h h, const void* buf, unsigned int size) {
-  if (h == nullptr)
+  if (h == nullptr || buf == nullptr)
     return RPC_PORT_ERROR_INVALID_PARAMETER;
 
   auto port = static_cast<Port*>(h);
@@ -319,7 +319,7 @@ RPC_API int rpc_port_proxy_get_port(rpc_port_proxy_h h,
 }
 
 RPC_API int rpc_port_stub_create(rpc_port_stub_h* h, const char* port_name) {
-  if (h == nullptr)
+  if (h == nullptr || port_name == nullptr)
     return RPC_PORT_ERROR_INVALID_PARAMETER;
 
   auto p = new ::StubExt(port_name);
@@ -330,7 +330,7 @@ RPC_API int rpc_port_stub_create(rpc_port_stub_h* h, const char* port_name) {
 
 RPC_API int rpc_port_stub_create_mockup(rpc_port_stub_h* h,
                                         const char* port_name) {
-  if (h == nullptr)
+  if (h == nullptr || port_name == nullptr)
     return -1;
 
   auto p = new ::StubExt(port_name, true);