Hi Holger,

On 07/04/11 22:23, Holger Hans Peter Freyther wrote:
> On 04/07/2011 02:27 PM, [email protected] wrote:
> thanks for the cleaning, the criticism is to the code as it was before.
> 
>>              t_tag = *cur++;
>>  
>> -            DEBUGPC(DMI, "%s='%s' ", ipac_idtag_name(t_tag), cur);
>> +            DEBUGPC(DMI, "%s='%s' ", ipaccess_idtag_name(t_tag), cur);
> 
> I think we still rely that the strings on the wire have a null termination?
> IIRC I once patched one version (of the many) to check for it and otherwise
> discard it. Would you mind taking a look at it?

I'll have a look at all string handling.

>> -static const char *ipac_idtag_name(int tag)
>> +const char *ipaccess_idtag_name(int tag)
>>  {
>>      if (tag >= ARRAY_SIZE(idtag_names))
>>              return "unknown";
> 
> we probably want to make the parameter uint?

I have a patch for this here, I'll send it asap.

Reply via email to