... | ... |
@@ -1,3 +1,7 @@ |
1 |
+Thu Jan 20 11:38:33 EET 2011 (edwin) |
|
2 |
+------------------------------------ |
|
3 |
+ * libclamav/pdf.c: fix missed detection (bb #2455). |
|
4 |
+ |
|
1 | 5 |
Thu Jan 20 11:19:50 EET 2011 (edwin) |
2 | 6 |
----------------------------------- |
3 | 7 |
* libclamav/pdf.c: fix another pdf uninit (bb #2404). |
... | ... |
@@ -114,7 +114,7 @@ static int find_stream_bounds(const char *start, off_t bytesleft, off_t byteslef |
114 | 114 |
if ((q2 = cli_memstr(start, bytesleft, "stream", 6))) { |
115 | 115 |
q2 += 6; |
116 | 116 |
bytesleft -= q2 - start; |
117 |
- if (bytesleft < 1) |
|
117 |
+ if (bytesleft < 0) |
|
118 | 118 |
return 0; |
119 | 119 |
if (bytesleft >= 2 && q2[0] == '\xd' && q2[1] == '\xa') |
120 | 120 |
q2 += 2; |
... | ... |
@@ -122,7 +122,7 @@ static int find_stream_bounds(const char *start, off_t bytesleft, off_t byteslef |
122 | 122 |
q2++; |
123 | 123 |
*stream = q2 - start; |
124 | 124 |
bytesleft2 -= q2 - start; |
125 |
- if (bytesleft2 < 0) |
|
125 |
+ if (bytesleft2 <= 0) |
|
126 | 126 |
return 0; |
127 | 127 |
q = q2; |
128 | 128 |
q2 = cli_memstr(q, bytesleft2, "endstream", 9); |