Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5a5b3b21 authored by Ajay Panicker's avatar Ajay Panicker
Browse files

Null-terminate hex string in uuid_new()

Change-Id: I28d8b9e6495992ab990e9bd618221373848957c8
parent 5455dfa2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -68,7 +68,7 @@ bt_uuid_t *uuid_new(const char *uuid_string) {

  const char *s = uuid_string;
  for (size_t i = 0; i < sizeof(bt_uuid_t); ++i, s+=2) {
    char buf[2];
    char buf[3] = {0};
    buf[0] = s[0];
    buf[1] = s[1];
    uuid->uu[i] = strtoul(buf, NULL, 16);