fix possible NULL dereference (bb#611)

git-svn: trunk@3187
This commit is contained in:
Tomasz Kojm
2007-08-21 20:37:39 +00:00
parent 7df56d47b9
commit f7abbf278e
2 changed files with 8 additions and 1 deletions

View File

@@ -1,3 +1,7 @@
Tue Aug 21 21:42:14 CEST 2007 (tk)
----------------------------------
* libclamav/rtf.c: fix possible NULL dereference (bb#611)
Tue Aug 21 21:39:06 CEST 2007 (tk)
----------------------------------
* libclamav/ole2_extract.c: properly initialise hdr.max_block_no (bb#603)

View File

@@ -606,7 +606,9 @@ int cli_scanrtf(int desc, cli_ctx *ctx)
return ret;
}
if(( ret = state.cb_process(&state, ptr, use) )) {
state.cb_end(&state,ctx);
if(state.cb_end) {
state.cb_end(&state,ctx);
}
SCAN_CLEANUP;
return ret;
}
@@ -677,6 +679,7 @@ int cli_scanrtf(int desc, cli_ctx *ctx)
if(action != -1) {
if(state.cb_data && state.cb_end) {/* premature end of previous block */
state.cb_end(&state,ctx);
state.cb_begin = NULL;
state.cb_end = NULL;
state.cb_data = NULL;
}