Commit 17c0b578 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

ASAN: Specify buffer size

We have the information, better use it.
It was shown by an ASAN warning.
parent 24d0bdc6
......@@ -59,7 +59,8 @@ QByteArray fetchMetadata(FlatpakInstallation *installation, FlatpakResource *app
g_autoptr(GBytes) data = flatpak_installation_fetch_remote_metadata_sync(installation, app->origin().toUtf8().constData(), fakeRef, cancellable, &localError);
if (data) {
gsize len = 0;
metadataContent = QByteArray((char *)g_bytes_get_data(data, &len));
auto buff = g_bytes_get_data(data, &len);
metadataContent = QByteArray((const char*) buff, len);
} else {
qWarning() << "Failed to get metadata file: " << localError->message;
return {};
......
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