commit 475eae65239228c365ae7f3f6eeb47ccd38c6277 from: Martijn van Duren date: Sun Mar 27 08:31:21 2022 UTC For the key h tag we should skip over the alg, not the entire value when inside the loop. While here reorder some line folding since the mheader->ltok API name change. commit - 2b1224a85b6c0d5198786699a6e7c374a95fb8bd commit + 475eae65239228c365ae7f3f6eeb47ccd38c6277 blob - 634ee9df0363ae3b1d1b1808e7675eafaa27aec1 blob + 73ae9d9c086a40f0d2ce4ea32bb8a4093e5c2b84 --- main.c +++ main.c @@ -1208,12 +1208,10 @@ dkim_key_text_parse(struct signature *sig, const char if (h != 0) /* Duplicate tag */ return 0; /* Invalid tag value */ - if (osmtpd_ltok_skip_key_h_tag_value( - key, 0) != end) + if (osmtpd_ltok_skip_key_h_tag_value(key, 0) != end) return 0; while (1) { - if ((tagvend = - osmtpd_ltok_skip_key_h_tag_value( + if ((tagvend = osmtpd_ltok_skip_key_h_tag_alg( key, 0)) == NULL) break; hashname = strndup(key, tagvend - key);