[Linux-ha-dev] Re: [Linux-ha-cvs] Linux-HA CVS: lib by zhenh from

Huang Zhen zhenhltc at cn.ibm.com
Wed Sep 15 18:38:37 MDT 2004


Lars Marowsky-Bree wrote:
> On 2004-09-15T11:43:38,
>    Guochun Shi <gshi at ncsa.uiuc.edu> said:
> 
> 
>>>               output = cl_get_binary(msg, F_LRM_DATA,&output_len);
>>>               if (NULL != output){
>>>-                       op->output = output;
>>>+                       op->output = strndup(output, output_len);
>>>               }
>>
>>IMHO strndup will not work if there is '\0' in middle of binary values
> 
Sure.
However, in this context, we just need get string type data from message.
> 
> Right, that very likely should be a ha_malloc() + memcpy.
> 
> 
> Sincerely,
>     Lars Marowsky-Brée <lmb at suse.de>
> 


-- 

Best Regards,
Huang Zhen
LTC and pLinux Testing
IBM China Software Development Lab, Beijing
Telno: (8610)82782244-2845





More information about the Linux-HA-Dev mailing list