Hi Jorge, On 19-01-15 23:47, Jorge Luiz Silva Peixoto wrote: > Is the comparison between strlen ((char *)buf) and size correct? > Shouldn't be less equal?
That check is correct, since strlen() excludes the NULL-character, and we rely on the string begin NULL-terminated. > I'll do some tests, e.g. changing TLS_USERNAME_LEN from 64 to 65. At first glance this seems to be the right fix, but keep in mind that you'll have to change the warning messages using the value too, to keep them displaying '64'. > PS: According to rfc5280, common name maximum length is 64. Yes, and that is where this errors stems from. The strings used by rfc5280 are not NULL-terminated, whereas C strings are. Please feel free to send your patch to openvpn-de...@lists.sourceforge.net if you decide to do a patch for this. (and please use git format-patch to create such a patch). -Steffan ------------------------------------------------------------------------------ New Year. New Location. New Benefits. New Data Center in Ashburn, VA. GigeNET is offering a free month of service with a new server in Ashburn. Choose from 2 high performing configs, both with 100TB of bandwidth. Higher redundancy.Lower latency.Increased capacity.Completely compliant. http://p.sf.net/sfu/gigenet _______________________________________________ Openvpn-users mailing list Openvpn-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-users