uhttpd: Fix multiple format string problems
[project/uhttpd.git] / ubus.c
diff --git a/ubus.c b/ubus.c
index f7d1f11a15037839ff1c46656ad11a37985cb623..8cfbd97968351edb75bb9c86815606059d8e8113 100644 (file)
--- a/ubus.c
+++ b/ubus.c
@@ -144,11 +144,11 @@ static void uh_ubus_add_cors_headers(struct client *cl)
        }
 
        ustream_printf(cl->us, "Access-Control-Allow-Origin: %s\r\n",
-                      blobmsg_data(tb[HDR_ORIGIN]));
+                      blobmsg_get_string(tb[HDR_ORIGIN]));
 
        if (tb[HDR_ACCESS_CONTROL_REQUEST_HEADERS])
                ustream_printf(cl->us, "Access-Control-Allow-Headers: %s\r\n",
-                              blobmsg_data(tb[HDR_ACCESS_CONTROL_REQUEST_HEADERS]));
+                              blobmsg_get_string(tb[HDR_ACCESS_CONTROL_REQUEST_HEADERS]));
 
        ustream_printf(cl->us, "Access-Control-Allow-Methods: POST, OPTIONS\r\n");
        ustream_printf(cl->us, "Access-Control-Allow-Credentials: true\r\n");