Commit cf30a3d9 authored by hjk's avatar hjk
Browse files

Rcc: ensure enough space for the embedded


The two-pass feature depends on the QRC_DATA signature that needs
to be stored in the array later overwritten by the embedded data.

Task-number: QTBUG-42359
Change-Id: Ida1ccff40dda28f92a4267f86f48ee96d62bd214
Reviewed-by: default avataraavit <eirik.aavitsland@theqtcompany.com>
Showing with 2 additions and 0 deletions
...@@ -889,6 +889,8 @@ bool RCCResourceLibrary::writeDataBlobs() ...@@ -889,6 +889,8 @@ bool RCCResourceLibrary::writeDataBlobs()
if (m_format == C_Code) if (m_format == C_Code)
writeString("\n};\n\n"); writeString("\n};\n\n");
else if (m_format == Pass1) { else if (m_format == Pass1) {
if (offset < 8)
offset = 8;
writeString("\nstatic const unsigned char qt_resource_data["); writeString("\nstatic const unsigned char qt_resource_data[");
writeByteArray(QByteArray::number(offset)); writeByteArray(QByteArray::number(offset));
writeString("] = { 'Q', 'R', 'C', '_', 'D', 'A', 'T', 'A' };\n\n"); writeString("] = { 'Q', 'R', 'C', '_', 'D', 'A', 'T', 'A' };\n\n");
......
Supports Markdown
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