diff --git a/tools/csr.c b/tools/csr.c
index 15ae7c4..9408fb6 100644
--- a/tools/csr.c
+++ b/tools/csr.c
if (csr_map[i].id == id)
return csr_map[i].str;
- snprintf(str, 11, "Build %d", id);
+ snprintf(str, sizeof(str), "Build %d", id);
return str;
}
diff --git a/tools/hciattach_st.c b/tools/hciattach_st.c
index 474545a..85a2e08 100644
--- a/tools/hciattach_st.c
+++ b/tools/hciattach_st.c
{
DIR *dir;
struct dirent *d;
- char pathname[PATH_MAX], filename[NAME_MAX], prefix[20];
+ char pathname[PATH_MAX], filename[NAME_MAX + 2], prefix[20];
unsigned char cmd[256];
unsigned char buf[256];
uint8_t seqnum = 0;