> My only worry is that the (char *)to parameter passed in has to be 
> long enough to hold the (char*)from parameter.  I assume it is.
>
> Craig
>
Clearly this was also the concern of the original author, who, to avoid 
any assumption, decided to use strncpy to avoid buffer overflows. Simply 
he/she thought that his/her sizeof(to) was referring to the size of the 
original data structure in OBAtom (_type[6]), while it was actually 
referring to the size of the data structure passed to the Translate() 
function, that is, char *.

Have a nice day,
p.

-- 
==========================================================
Paolo Tosco, Ph.D.                Phone: +39 011 6707680
Department of Drug Science        Fax:   +39 011 6707687
and Technology                    Mob:   +39 348 5537206
Via Pietro Giuria, 9
10125 Torino, Italy
                                   http://open3dalign.org
E-mail: paolo.to...@unito.it      http://open3dqsar.org
==========================================================


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to