Commit f075a343 authored by Alyssa Rosenzweig's avatar Alyssa Rosenzweig

Fix harmless but questionable buffer overrun

parent 98160e7f
......@@ -753,8 +753,11 @@ soup_beacon_callback(SoupServer *server,
gsize size;
guint8 *payload8 = g_bytes_unref_to_data(payload, &size);
payload8[size] = '\0';
guint8 *payload8_buffer = g_bytes_unref_to_data(payload, &size);
/* Null terminate */
gchar *payload8 = g_strndup((gchar *) payload8_buffer, size);
if (!payload8) {
soup_message_set_status(msg, SOUP_STATUS_NOT_FOUND);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment