Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

Commit

Permalink
littleb.c: Fixed buffer overflow
Browse files Browse the repository at this point in the history
Signed-off-by: Houman brinjcargorabi <hbrinjcar@gmail.com>
  • Loading branch information
Hbrinj committed Aug 24, 2016
1 parent 061f7f8 commit 99f4593
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/littleb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1533,7 +1533,7 @@ lb_register_characteristic_read_event(lb_context lb_ctx,
int r;
sd_bus_error error = SD_BUS_ERROR_NULL;
lb_ble_char* ble_char_new = NULL;
char match[65];
char match[68];

if (lb_ctx == NULL) {
syslog(LOG_ERR, "%s: lb_ctx is null", __FUNCTION__);
Expand Down Expand Up @@ -1571,7 +1571,7 @@ lb_register_characteristic_read_event(lb_context lb_ctx,
return -LB_ERROR_SD_BUS_CALL_FAIL;
}

snprintf(match, 66, "path='%s'", ble_char_new->char_path);
snprintf(match, 67, "path='%s'", ble_char_new->char_path);

int current_index = event_arr_size;
if (event_arr_size == 0 || events_matches_array == NULL) {
Expand Down

0 comments on commit 99f4593

Please sign in to comment.