[Pkg-clamav-commits] [SCM] Debian repository for ClamAV branch, debian/unstable, updated. debian/0.95+dfsg-1-6156-g094ec9b
Török Edvin
edwin at clamav.net
Sun Apr 4 01:24:02 UTC 2010
The following commit has been merged in the debian/unstable branch:
commit 02068643c157544aff49f79a1229f6210f2f1751
Author: Török Edvin <edwin at clamav.net>
Date: Mon Mar 22 14:58:58 2010 +0200
Print location of runtime error.
diff --git a/libclamav/bytecode_api.c b/libclamav/bytecode_api.c
index 5bf4e9f..57b5c13 100644
--- a/libclamav/bytecode_api.c
+++ b/libclamav/bytecode_api.c
@@ -779,3 +779,11 @@ int32_t cli_bcapi_inflate_done(struct cli_bc_ctx *ctx , int32_t id)
return ret;
}
+int32_t cli_bcapi_bytecode_rt_error(struct cli_bc_ctx *ctx , int32_t id)
+{
+ int32_t line = id >> 8;
+ int32_t col = id&0xff;
+ cli_warnmsg("Bytecode runtime error at line %u, col %u\n", line, col);
+ return 0;
+}
+
diff --git a/libclamav/bytecode_api.h b/libclamav/bytecode_api.h
index 1a94202..78ad03e 100644
--- a/libclamav/bytecode_api.h
+++ b/libclamav/bytecode_api.h
@@ -245,5 +245,7 @@ int32_t inflate_init(int32_t from_buffer, int32_t to_buffer, int32_t windowBits)
int32_t inflate_process(int32_t id);
int32_t inflate_done(int32_t id);
+int32_t bytecode_rt_error(int32_t locationid);
+
#endif
#endif
diff --git a/libclamav/bytecode_api_decl.c b/libclamav/bytecode_api_decl.c
index 839003e..078013b 100644
--- a/libclamav/bytecode_api_decl.c
+++ b/libclamav/bytecode_api_decl.c
@@ -74,6 +74,7 @@ int32_t cli_bcapi_buffer_pipe_done(struct cli_bc_ctx *ctx , int32_t);
int32_t cli_bcapi_inflate_init(struct cli_bc_ctx *ctx , int32_t, int32_t, int32_t);
int32_t cli_bcapi_inflate_process(struct cli_bc_ctx *ctx , int32_t);
int32_t cli_bcapi_inflate_done(struct cli_bc_ctx *ctx , int32_t);
+int32_t cli_bcapi_bytecode_rt_error(struct cli_bc_ctx *ctx , int32_t);
const struct cli_apiglobal cli_globals[] = {
/* Bytecode globals BEGIN */
@@ -185,7 +186,8 @@ const struct cli_apicall cli_apicalls[]={
{"buffer_pipe_done", 8, 12, 2},
{"inflate_init", 9, 0, 7},
{"inflate_process", 8, 13, 2},
- {"inflate_done", 8, 14, 2}
+ {"inflate_done", 8, 14, 2},
+ {"bytecode_rt_error", 8, 15, 2}
/* Bytecode APIcalls END */
};
const cli_apicall_int2 cli_apicalls0[] = {
@@ -227,7 +229,8 @@ const cli_apicall_int1 cli_apicalls2[] = {
(cli_apicall_int1)cli_bcapi_buffer_pipe_write_avail,
(cli_apicall_int1)cli_bcapi_buffer_pipe_done,
(cli_apicall_int1)cli_bcapi_inflate_process,
- (cli_apicall_int1)cli_bcapi_inflate_done
+ (cli_apicall_int1)cli_bcapi_inflate_done,
+ (cli_apicall_int1)cli_bcapi_bytecode_rt_error
};
const cli_apicall_malloclike cli_apicalls3[] = {
(cli_apicall_malloclike)cli_bcapi_malloc
diff --git a/libclamav/bytecode_api_impl.h b/libclamav/bytecode_api_impl.h
index ce9c3c9..f8f6997 100644
--- a/libclamav/bytecode_api_impl.h
+++ b/libclamav/bytecode_api_impl.h
@@ -71,5 +71,6 @@ int32_t cli_bcapi_buffer_pipe_done(struct cli_bc_ctx *ctx , int32_t);
int32_t cli_bcapi_inflate_init(struct cli_bc_ctx *ctx , int32_t, int32_t, int32_t);
int32_t cli_bcapi_inflate_process(struct cli_bc_ctx *ctx , int32_t);
int32_t cli_bcapi_inflate_done(struct cli_bc_ctx *ctx , int32_t);
+int32_t cli_bcapi_bytecode_rt_error(struct cli_bc_ctx *ctx , int32_t);
#endif
--
Debian repository for ClamAV
More information about the Pkg-clamav-commits
mailing list