[exim-cvs] ARC: harden against malformed headers

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Exim Git Commits Mailing List
Dátum:  
Címzett: exim-cvs
Tárgy: [exim-cvs] ARC: harden against malformed headers
Gitweb: https://git.exim.org/exim.git/commitdiff/b4dd15a736795e6d06a79febbae76a926964bbb0
Commit:     b4dd15a736795e6d06a79febbae76a926964bbb0
Parent:     d6e81e5fbdb2608edbf5a3c12ee09433ea07ecda
Author:     Jeremy Harris <jgh146exb@???>
AuthorDate: Sat Apr 27 13:22:52 2019 +0100
Committer:  Jeremy Harris <jgh146exb@???>
CommitDate: Sat Apr 27 13:22:52 2019 +0100


    ARC: harden against malformed headers
---
 src/src/arc.c | 2 ++
 1 file changed, 2 insertions(+)


diff --git a/src/src/arc.c b/src/src/arc.c
index 6c4bcc6..e7ebb97 100644
--- a/src/src/arc.c
+++ b/src/src/arc.c
@@ -260,6 +260,7 @@ while ((c = *s))
       while ((c = *++s) && c != ';')
         if (c != ' ' && c != '\t' && c != '\n' && c != '\r')
           g = string_catn(g, s, 1);
+      if (!g) return US"no b= value";
       al->b.data = string_from_gstring(g);
       al->b.len = g->ptr;
       gstring_reset_unused(g);
@@ -276,6 +277,7 @@ while ((c = *s))
       while ((c = *++s) && c != ';')
         if (c != ' ' && c != '\t' && c != '\n' && c != '\r')
           g = string_catn(g, s, 1);
+      if (!g) return US"no bh= value";
       al->bh.data = string_from_gstring(g);
       al->bh.len = g->ptr;
       gstring_reset_unused(g);