Skip to content

clamavr_reload(): cl_engine_free() and cl_engine_new() before cl_load()#5

Open
kmullin wants to merge 1 commit into
eagleas:masterfrom
kmullin:upstream
Open

clamavr_reload(): cl_engine_free() and cl_engine_new() before cl_load()#5
kmullin wants to merge 1 commit into
eagleas:masterfrom
kmullin:upstream

Conversation

@kmullin

@kmullin kmullin commented Sep 21, 2012

Copy link
Copy Markdown

I was trying to use your Ruby bindings for libclamav 0.97.6 and noticed that reload() wasn't working properly and would cause libclamav to error out with:

LibClamAV Error: cl_load(): can't load new databases when engine is already compiled
RuntimeError - cl_load() error: Invalid argument passed to function

With my very little C knowledge I traced it down to this piece of code missing where you need to actually call cl_engine_free() and then cl_engine_new()

I crossed referenced it with clamav api docs

DISCLAIMER: I have not tested this with libclamav 0.96.x (yet).

Opening Pull Request for visibility, and discussion.

…ngine_free then cl_engine_new, and finally cl_engine_compile after cl_load; also remembering to reset signo
@shishirsharma

Copy link
Copy Markdown

Looks like developer is not active. 👎

@kmullin

kmullin commented Feb 12, 2013

Copy link
Copy Markdown
Author

Ya, it looks that way.

If you'd like, you can checkout my more recent working copy here: https://github.com/kmullin/clamav

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants