From a4aab7871939d3661557fd843e0d411bbaa78bc6 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Mon, 4 Nov 2019 10:31:04 +0100 Subject: [PATCH] OpenSSL::Ordinals: when validating, collect statistics on unassigned syms If a script wants to display how many symbols have assigned numbers and how many don't, this gives them those numbers. Reviewed-by: Matt Caswell Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/10348) --- util/perl/OpenSSL/Ordinals.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/util/perl/OpenSSL/Ordinals.pm b/util/perl/OpenSSL/Ordinals.pm index 411cdc9d60..c3cfc98e71 100644 --- a/util/perl/OpenSSL/Ordinals.pm +++ b/util/perl/OpenSSL/Ordinals.pm @@ -662,6 +662,11 @@ sub validate { && @{$self->{contents}->[$i] // []})) { $self->{stats}->{new}++; } + if ($i <= $self->{maxassigned}) { + $self->{stats}->{assigned}++; + } else { + $self->{stats}->{unassigned}++; + } next if ($i > $self->{loaded_maxnum}); my @loaded_strings = -- 2.25.1