Diff between 15895e401e1e29821b67bdc9d12d3bfa67333b35 and 6c712030567b76e4ea29adbd816c0e5cc994a45c
Changed Files
| File | Additions | Deletions | Status |
| client/gatt.c | +2 | -1 | modified |
Full Patch
diff --git a/client/gatt.c b/client/gatt.c
index 25d593f..8f29202 100644
--- a/client/gatt.c
+++ b/client/gatt.c
@@ -2143,7 +2143,8 @@ static int write_value(size_t *dst_len, uint8_t **dst_value, uint8_t *src_val,
*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;
}