Skip Menu |
 

This queue is for tickets about the Net-SSLeay CPAN distribution.

Report information
The Basics
Id: 35754
Status: resolved
Priority: 0/
Queue: Net-SSLeay

People
Owner: Nobody in particular
Requestors: Steffen_Ullrich [...] genua.de
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.32
Fixed in: (no value)



Subject: X509_NAME_get_text_by_NID returns string including trailing \0
Download (untitled) / with headers
text/plain 372b
The C function X509_NAME_get_text_by_NID returns the string including the trailing \0. This string is then put into an SV, including the trailing \0. This is wrong, it should be added without the \0. Fix is simple and works for me: - sv_setpvn( ST(0), buf, length + 1); + sv_setpvn( ST(0), buf, length); Included as a patch agains 1.33_01, SVN 223. Regards, Steffen
Subject: SSLeay.xs.patch
Download SSLeay.xs.patch
text/x-diff 378b
Index: trunk/SSLeay.xs =================================================================== --- trunk/SSLeay.xs (revision 223) +++ trunk/SSLeay.xs (working copy) @@ -1505,7 +1505,7 @@ New(0, buf, length+1, char); if (X509_NAME_get_text_by_NID(name, nid, buf, length + 1)) - sv_setpvn( ST(0), buf, length + 1); + sv_setpvn( ST(0), buf, length); Safefree(buf); X509 *


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.