This fixes the following warning:
client/gatt.c:2146:2: warning: Null pointer passed to 2nd parameter
expecting 'nonnull' [core.NonNullParamChecker]
memcpy(*dst_value + offset, src_val, src_len);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Manika Shrivastava <manika.sh@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
*dst_value = g_realloc(*dst_value, *dst_len);
}
- memcpy(*dst_value + offset, src_val, src_len);
+ if (src_val && src_len)
+ memcpy(*dst_value + offset, src_val, src_len);
return 0;
}