... | ... |
@@ -1,3 +1,7 @@ |
1 |
+Thu Jul 14 12:29:17 EEST 2011 (edwin) |
|
2 |
+------------------------------------ |
|
3 |
+ * libclamav/pdf.c: fix encrypted pdf detection (bb #2988) |
|
4 |
+ |
|
1 | 5 |
Thu Jul 14 12:20:04 CEST 2011 (acab) |
2 | 6 |
------------------------------------ |
3 | 7 |
* clamav-milter/clamfi.c: fix typo in error message (bb#3040) |
... | ... |
@@ -1325,6 +1325,11 @@ static void pdf_handle_enc(struct pdf_struct *pdf) |
1325 | 1325 |
O = U = NULL; |
1326 | 1326 |
do { |
1327 | 1327 |
EM = pdf_readbool(q, len, "/EncryptMetadata", 1); |
1328 |
+ P = pdf_readint(q, len, "/P"); |
|
1329 |
+ if (P == ~0u) { |
|
1330 |
+ cli_dbgmsg("cli_pdf: invalid P\n"); |
|
1331 |
+ break; |
|
1332 |
+ } |
|
1328 | 1333 |
|
1329 | 1334 |
q2 = cli_memstr(q, len, "/Standard", 9); |
1330 | 1335 |
if (!q2) { |
... | ... |
@@ -1380,11 +1385,6 @@ static void pdf_handle_enc(struct pdf_struct *pdf) |
1380 | 1380 |
break; |
1381 | 1381 |
} |
1382 | 1382 |
} |
1383 |
- P = pdf_readint(q, len, "/P"); |
|
1384 |
- if (P == ~0u) { |
|
1385 |
- cli_dbgmsg("cli_pdf: invalid P\n"); |
|
1386 |
- break; |
|
1387 |
- } |
|
1388 | 1383 |
length = pdf_readint(q, len, "/Length"); |
1389 | 1384 |
if (length == ~0u) |
1390 | 1385 |
length = 40; |