about summary refs log tree commit diff
path: root/rfc2045.c
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2020-05-09 23:09:48 +0200
committerLeah Neukirchen <leah@vuxu.org>2020-05-09 23:09:48 +0200
commit41c8fefb73b3a0929aa198f913ab3ac50b967fc1 (patch)
tree0c374a458ffef8d057f12d20509c3f8d9e21b88b /rfc2045.c
parent61caf5a6a35ae73fd0842ba8886856e9298942d1 (diff)
downloadmblaze-41c8fefb73b3a0929aa198f913ab3ac50b967fc1.tar.gz
mblaze-41c8fefb73b3a0929aa198f913ab3ac50b967fc1.tar.xz
mblaze-41c8fefb73b3a0929aa198f913ab3ac50b967fc1.zip
blaze822_walk_mime: limit recursion depth
Diffstat (limited to 'rfc2045.c')
-rw-r--r--rfc2045.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/rfc2045.c b/rfc2045.c
index 2a6376b..df48d57 100644
--- a/rfc2045.c
+++ b/rfc2045.c
@@ -182,6 +182,9 @@ blaze822_walk_mime(struct message *msg, int depth, blaze822_mime_callback visit)
 
 	blaze822_mime_action r = MIME_CONTINUE;
 
+	if (depth > 64)
+		return MIME_PRUNE;
+
 	if (blaze822_mime_body(msg, &ct, &body, &bodylen, &bodychunk)) {
 
 		r = visit(depth, msg, body, bodylen);