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

Commit 99f4593

Browse files
committed
littleb.c: Fixed buffer overflow
Signed-off-by: Houman brinjcargorabi <[email protected]>
1 parent 061f7f8 commit 99f4593

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/littleb.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1533,7 +1533,7 @@ lb_register_characteristic_read_event(lb_context lb_ctx,
15331533
int r;
15341534
sd_bus_error error = SD_BUS_ERROR_NULL;
15351535
lb_ble_char* ble_char_new = NULL;
1536-
char match[65];
1536+
char match[68];
15371537

15381538
if (lb_ctx == NULL) {
15391539
syslog(LOG_ERR, "%s: lb_ctx is null", __FUNCTION__);
@@ -1571,7 +1571,7 @@ lb_register_characteristic_read_event(lb_context lb_ctx,
15711571
return -LB_ERROR_SD_BUS_CALL_FAIL;
15721572
}
15731573

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

15761576
int current_index = event_arr_size;
15771577
if (event_arr_size == 0 || events_matches_array == NULL) {

0 commit comments

Comments
 (0)