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

Commit 6c4e3143 authored by Ajay Panicker's avatar Ajay Panicker Committed by android-build-merger
Browse files

Null-terminate hex string in uuid_new()

am: 5a5b3b21

* commit '5a5b3b21':
  Null-terminate hex string in uuid_new()
parents 485eda4b 5a5b3b21
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);