mac_addr_arr + 2, mac_addr_arr + 3, mac_addr_arr + 4,
mac_addr_arr + 5);
- mac_addr = talloc_asprintf(ctx, "01-%02X-%02X-%02X-%02X-%02X-%02X",
+ mac_addr = talloc_asprintf(ctx, "01-%02x-%02x-%02x-%02x-%02x-%02x",
mac_addr_arr[0], mac_addr_arr[1], mac_addr_arr[2],
mac_addr_arr[3], mac_addr_arr[4], mac_addr_arr[5]);
/* strip filename from the bootfile path, leaving only a
* directory */
p = strrchr(basedir, '/');
- if (p)
- *p = '\0';
+ if (!p)
+ p = basedir;
+ *p = '\0';
if (strlen(basedir))
url_str = talloc_asprintf_append(url_str, "%s/",