File CVE-2024-34020-putSDN_OOB_write.patch of Package hcode

Index: hcode2.1-mailpatch3/mail.c
===================================================================
--- hcode2.1-mailpatch3.orig/mail.c
+++ hcode2.1-mailpatch3/mail.c
@@ -240,7 +240,7 @@ int outCode;
     unsigned char ibuf[HDR_BUF_LEN],obuf[HDR_BUF_LEN],tbuf[HDR_BUF_LEN];
     unsigned char *iptr, *tptr;
 
-    if ( cp >= HDR_BUF_LEN ) {
+    if ( cp >= (HDR_BUF_LEN-8) ) {
         pr2m(Printwc,fpout,outCode);
         return;
     }
openSUSE Build Service is sponsored by