SECURITY: fix Qualys CVE-2020-PFPZA
[exim.git] / src / src / parse.c
index 7dfb9a7eb5f0e69774bcad94c7b4df4913251da0..8d689e88adc349b59cafd110813d64779fc562fa 100644 (file)
@@ -984,6 +984,11 @@ if (i < len)
 
 /* No non-printers; use the RFC 822 quoting rules */
 
+if (!len)
+  {
+  return string_copy_taint_function("", is_tainted(phrase));
+  }
+
 buffer = store_get(len*4, is_tainted(phrase));
 
 s = phrase;