Browse code

fix possible reference to NULL pointer in experimental code

git-svn: trunk@2588

Tomasz Kojm authored on 2007/01/03 22:07:41
Showing 2 changed files
... ...
@@ -1,3 +1,8 @@
1
+Wed Jan  3 13:35:06 CET 2007 (tk)
2
+---------------------------------
3
+  * libclamav/htmlnorm.c: fix possible reference to NULL pointer in
4
+			  experimental code (bb#140), patch from NJH
5
+
1 6
 Sun Dec 31 19:38:17 CET 2006 (tk)
2 7
 ---------------------------------
3 8
   * libclamav/unzip.c: improve detection of central directory (bb#33)
... ...
@@ -440,7 +440,7 @@ static inline void html_tag_set_inahref(tag_arguments_t *tags,int idx,int in_ahr
440 440
  */
441 441
 static inline void html_tag_contents_append(tag_arguments_t *tags,int idx,const unsigned char* begin,const unsigned char *end)
442 442
 {
443
-	if(begin<end) {
443
+	if(end && (begin<end)) {
444 444
 		blobAddData(tags->contents[idx-1],begin,end-begin);
445 445
 	}
446 446
 }