[prev in list] [next in list] [prev in thread] [next in thread]
List: clamav-devel
Subject: Re: [Clamav-devel] Help to fix some code with new API
From: Renato Botelho <rbgarga () gmail ! com>
Date: 2009-03-25 18:51:02
Message-ID: 747dc8f30903251151k48aea5cdtf47eb2f7ec57d3ff () mail ! gmail ! com
[Download RAW message or body]
2009/3/25 Török Edwin <edwintorok@gmail.com>:
> On 2009-03-25 19:54, Renato Botelho wrote:
>> On Wed, Mar 25, 2009 at 2:46 PM, Renato Botelho <rbgarga@gmail.com> wrote:
>>
>>> On Wed, Mar 25, 2009 at 2:14 PM, Gianluigi Tiesi <sherpya@netfarm.it> wrote:
>>>
>>>> -----BEGIN PGP SIGNED MESSAGE-----
>>>> Hash: SHA1
>>>>
>>>> Renato Botelho wrote:
>>>>
>>>>> Hello,
>>>>>
>>>>> I want to update clamav to 0.95 on FreeBSD ports collection, but,
>>>>> before it I need to have all dependant ports working fine.
>>>>>
>>>>> I've contacted some maintainers / authors and got fixes, but, there
>>>>> are 2 of them missing and I tried to fix it by myself.
>>>>>
>>>>> Could anyone take a look at those patches and let me know if I
>>>>> missed something? They are building fine, but it doesn't mean
>>>>> they are working fine.
>>>>>
>>>>>
>>>> - - limits are gone
>>>> - - you should use cl_engine_set_num() to set maxfilesize and friends
>>>> - - you need cl_init(CL_INIT_DEFAULT)
>>>>
>>
>> Wrong code, now:
>>
>> static struct cl_engine *root;
>>
>> if ((err = cl_init(CL_INIT_DEFAULT)))
>> throw cException(CLAMAV_CLASS_NAME,CLAMAV_CLASS_NAME,"cl_init",err);
>>
>> root = cl_engine_new();
>>
>
> You should check for failure here (== NULL).
I'll do
>> if ((err = cl_load(cl_retdbdir(), root, &signo, CL_DB_STDOPT)))
>> throw cException(CLAMAV_CLASS_NAME,CLAMAV_CLASS_NAME,"cl_load",err);
>>
>> if ((err = cl_engine_compile(root)))
>> throw cException(CLAMAV_CLASS_NAME,CLAMAV_CLASS_NAME,"cl_engine_compile",err);
>>
>> cl_engine_free(root);
>>
>
> You should check for error here too.
I'll do too
I'll send those patches to authors and maintainers and ask him to test
Thank you
--
Renato Botelho
_______________________________________________
http://lurker.clamav.net/list/clamav-devel.html
Please submit your patches to our Bugzilla: http://bugs.clamav.net
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic