bb #8385: PDF ASCII85Decode zero-length fix
diff --git a/libclamav/pdf.c b/libclamav/pdf.c index 121fa01..f7aa5e1 100644 --- a/libclamav/pdf.c +++ b/libclamav/pdf.c
@@ -650,9 +650,13 @@ orig_length, length, size); pdfobj_flag(pdf, obj, BAD_STREAMLEN); } - if (!length) + if (!length) { length = size; - + if (!length) { + cli_dbgmsg("pdf_extract_obj: length and size both 0\n"); + break; /* Empty stream, nothing to scan */ + } + } if (obj->flags & (1 << OBJ_FILTER_AH)) { ascii_decoded = cli_malloc(length/2 + 1); if (!ascii_decoded) {