CVE-2020-28023: Out-of-bounds read in smtp_setup_msg()
[exim.git] / src / src / macros.h
index f83ba1933db85a6f6e0c391499703b518435a590..b2f86ed5341868f39f2c4360f977eccf0e51abc6 100644 (file)
@@ -150,6 +150,7 @@ enough to hold all the headers from a normal kind of message. */
 /* The size of the circular buffer that remembers recent SMTP commands */
 
 #define SMTP_HBUFF_SIZE 20
+#define SMTP_HBUFF_PREV(n)     ((n) ? (n)-1 : SMTP_HBUFF_SIZE-1)
 
 /* The initial size of a big buffer for use in various places. It gets put
 into big_buffer_size and in some circumstances increased. It should be at least