jan damborsky wrote:
> Hi Evan,
> 
> please see my response in line.
> 
> Thank you,
> Jan
> 
> 
> On 03/31/09 01:23, Evan Layton wrote:
>> jan damborsky wrote:
>>> ai_utils.c
>>> ----------
>>> 52 - since  ssize_t is not a pointer, I might recommend to
>>>     return 0 instead of NULL in case of failure.
>>>
>>> 61-62 - is this check valid ? Looking at the scf_limit man page,
>>>     it is not specified that 0 is invalid value.
>>
>> Yes this is a valid check. If scf_limit fails it -1 which is waht 
>> we're checking for. However the comment is incorrect and should state 
>> that if scf_limit fails we return MAXPATHLEN.
> 
> Is it safe to return MAXPATHLEN in case of failure ? Is it
> assured that buffer overflow can't happen e.g. on lines
> 293, 501 ?
> I think that if scf_limit() fails, something is really broken
> and it might be safer not to proceed further.

I see what you're refering to. I've removed the function ai_get_scf_limit() in 
favor of just calling scf_limit and if it returns -1 we now return an error.

-evan

> 
>>
>>
>>>
>>> 171 - It seems that return code doesn't reflect the
>>>      failure, since it was checked on 168 that property
>>>      group exists
>>
>> you're right the return code is incorrect. I added "AI_PG_DELETE_ERR, 
>>     /* Failed to delete PG */" in the header file and this now returns 
>> that error.
> 
> Thank you.
> 
>>
>>>
>>>
>>> 417         if ((ret = ai_end_transaction(handle)) != AI_SUCCESS) {
>>> ->
>>> 417         return (ai_end_transaction(handle));
>>
>> I added another function that needs to be called here in case the call 
>> to end_transaction fails. This fucntion (ai_abort_tranaction) will 
>> clean things up if there is a transaction failure. For more on this 
>> see my response to Sundar's comments.
> 
> ok.
> 
>>
>>>
>>>
>>> 464, 465, 499, 566, 595
>>> - how is it handled, if scf_limit() fails in ai_get_scf_limit() ?
>>
>> I don't understand what you mean here. In each instance we'll have 
>> MAXPATHLEN as the value in vallen and we'll use that for getting the 
>> value.
> 
> I am sorry for the confusion - please see my comments
> above about scf_limit() failure.
> 


Reply via email to