mirror of
https://github.com/zeek/zeek.git
synced 2025-10-16 21:48:21 +00:00
Make x509 end-of-string-check nicer.
Use remaining instead of the total length, in case someone changes the code later and changes pString before.
This commit is contained in:
parent
708ede22c6
commit
5785530c6b
1 changed files with 1 additions and 1 deletions
|
@ -535,7 +535,7 @@ double file_analysis::X509::GetTimeFromAsn1(const ASN1_TIME* atime, const char*
|
|||
return 0;
|
||||
}
|
||||
|
||||
if ( pString[atime->length-1] != 'Z' )
|
||||
if ( pString[remaining-1] != 'Z' )
|
||||
{
|
||||
// not valid according to RFC 2459 4.1.2.5.1
|
||||
reporter->Weird(fmt("Could not parse UTC time in non-YY-format in X509 certificate (x509 %s)", fid));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue