Browse code

fix EOF handling, bug introduced in r3515.

git-svn: trunk@3519

Török Edvin authored on 2008/01/22 03:23:42
Showing 2 changed files
... ...
@@ -1,3 +1,7 @@
1
+Mon Jan 21 19:59:41 EET 2008 (edwin)
2
+------------------------------------
3
+  * libclamav/entconv.c: fix EOF handling, bug introduced in r3515.
4
+
1 5
 Mon Jan 21 18:16:53 CET 2008 (tk)
2 6
 ---------------------------------
3 7
   * configure,libclamav: drop internal snprintf implementation
... ...
@@ -1015,7 +1015,7 @@ unsigned char* encoding_norm_readline(struct entity_conv* conv, FILE* stream_in,
1015 1015
 				conv->encoding_symbolic = E_OTHER;
1016 1016
 			case E_UNKNOWN:
1017 1017
 			case E_OTHER:
1018
-				if(!input_limit) {
1018
+				if(!input_limit || input_offset == input_limit) {
1019 1019
 					/* nothing to do, EOF */
1020 1020
 					return NULL;
1021 1021
 				}