commit 332b3141862058633cc02e659ba3df0eb5e3e25c from: Martijn van Duren date: Thu Aug 22 12:56:02 2019 UTC SIZE_MAX doesn't fit inside the long long of strtonum commit - 67cd13234d8d66e4faa54caa0d57ebec4ba2e527 commit + 332b3141862058633cc02e659ba3df0eb5e3e25c blob - f2aa578f422c6b10f1a572e69f231437d332db95 blob + 5838abb8be9d0cd93177c84b49f0fc730a39ed67 --- opensmtpd.c +++ opensmtpd.c @@ -1460,7 +1460,7 @@ osmtpd_tx_commit(struct osmtpd_callback *cb, struct os char *params, char *linedup) { char *end; - const char *errstr; + const char *errstr = NULL; unsigned long imsgid; uint32_t msgid; size_t i, msgsz; @@ -1480,7 +1480,7 @@ osmtpd_tx_commit(struct osmtpd_callback *cb, struct os linedup); params = end + 1; - msgsz = strtonum(params, 0, SIZE_MAX, &errstr); + msgsz = strtonum(params, 0, UINT32_MAX, &errstr); if (errstr != NULL) osmtpd_errx(1, "Invalid line received: invalid msg size: %s", linedup);