← Commit list

dac98ccfa2

Daniel Stenberg
Daniel Stenberg
2026-01-13
SUCCESS Duration: 334s

Subject

mqtt: better too-big-message-check

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

lib/mqtt.c+1 -1
@@ -562,7 +562,7 @@ static CURLcode mqtt_publish(struct Curl_easy *data)
remaininglength = payloadlen + 2 + topiclen;
encodelen = mqtt_encode_len(encodedbytes, remaininglength);
- if(MAX_MQTT_MESSAGE_SIZE - remaininglength - 1 < encodelen) {
+ if(remaininglength > (MAX_MQTT_MESSAGE_SIZE - encodelen - 1)) {
result = CURLE_TOO_LARGE;
goto fail;
}