Skip to content

Commit

Permalink
bluez: Fix buffer length in gattlib_write_char_by_uuid()
Browse files Browse the repository at this point in the history
Issue found by @kwikius in #74 and @mweal-ed in #35.
  • Loading branch information
oliviermartin committed Mar 5, 2019
1 parent 3ce4632 commit 5da0a80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bluez/gattlib_read_write.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ int gattlib_write_char_by_uuid(gatt_connection_t* connection, uuid_t* uuid, cons
return ret;
}

return gattlib_write_char_by_handle(connection, handle, buffer, sizeof(buffer));
return gattlib_write_char_by_handle(connection, handle, buffer, buffer_len);
}

int gattlib_notification_start(gatt_connection_t* connection, const uuid_t* uuid) {
Expand Down

0 comments on commit 5da0a80

Please sign in to comment.