Browse code

libclamav/unarj.c: downgrade error message (bb#1444)

git-svn: trunk@4890

Tomasz Kojm authored on 2009/03/04 02:56:35
Showing 2 changed files
... ...
@@ -1,3 +1,7 @@
1
+Tue Mar  3 18:58:06 CET 2009 (tk)
2
+---------------------------------
3
+ * libclamav/unarj.c: downgrade error message (bb#1444)
4
+
1 5
 Tue Mar  3 03:26:08 CET 2009 (acab)
2 6
 -----------------------------------
3 7
  * clamav-milter/clamav-milter.c: Fix syslog ident typo and include wrapage.
... ...
@@ -173,8 +173,11 @@ static int fill_buf(arj_decode_t *decode_data, int n)
173 173
 		if (decode_data->comp_size != 0) {
174 174
 			decode_data->comp_size--;
175 175
 			if (cli_readn(decode_data->fd, &decode_data->sub_bit_buf, 1) != 1) {
176
-				decode_data->status = CL_EREAD;
177
-				return CL_EREAD;
176
+				/* the file is most likely corrupted, so
177
+				 * we return CL_EFORMAT instead of CL_EREAD
178
+				 */
179
+				decode_data->status = CL_EFORMAT;
180
+				return CL_EFORMAT;
178 181
 			}
179 182
 		} else {
180 183
 			decode_data->sub_bit_buf = 0;