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

Commit

Permalink
Browse files Browse the repository at this point in the history
tools/csr: Fix possible buffer overflow
Make sure we don't write past the end of the array.
  • Loading branch information
jhedberg authored and Jarko Poutiainen committed Nov 13, 2017
1 parent 14b18d4 commit e8ff96c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bluez/tools/csr.c
Expand Up @@ -2756,7 +2756,7 @@ static int parse_line(char *str)

off++;

while (1) {
while (length <= sizeof(array) - 2) {
value = strtol(off, &end, 16);
if (value == 0 && off == end)
break;
Expand Down

0 comments on commit e8ff96c

Please sign in to comment.