mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-22 10:48:02 +00:00
e0c4386e7e
* Fixed PKCS12 Decoding crashes ([CVE-2024-0727]) * Fixed Excessive time spent checking invalid RSA public keys ([CVE-2023-6237]) * Fixed POLY1305 MAC implementation corrupting vector registers on PowerPC CPUs which support PowerISA 2.07 ([CVE-2023-6129]) * Fix excessive time spent in DH check / generation with large Q parameter value ([CVE-2023-5678]) Release notes can be found at https://www.openssl.org/news/openssl-3.0-notes.html. Approved by: emaste MFC after: 3 days Merge commit '9dd13e84fa8eca8f3462bd55485aa3da8c37f54a'
55 lines
1 KiB
Perl
Executable file
55 lines
1 KiB
Perl
Executable file
#! /usr/bin/env perl
|
|
#
|
|
# TEST c-compress-pl with a number of examples and what should happen to them
|
|
|
|
use strict;
|
|
use warnings;
|
|
|
|
use File::Basename;
|
|
|
|
my @pairs =
|
|
(
|
|
[ <<'_____'
|
|
/* A hell of a program */
|
|
#def\
|
|
ine foo/* bar */ 3
|
|
#define bar /* haha "A /* comment */ that should /* remain" */
|
|
#define haha /* hoho */ "A /* comment */ that should /* remain" */
|
|
|
|
int main() {
|
|
int x;
|
|
/* one lonely comment */
|
|
}
|
|
_____
|
|
, <<'_____'
|
|
#define foo 3
|
|
#define bar that should
|
|
#define haha "A /* comment */ that should /* remain" */
|
|
int main() {
|
|
int x;
|
|
}
|
|
_____
|
|
]
|
|
);
|
|
|
|
my $here = dirname $0;
|
|
my $c_compress = "$here/lang-compress.pl";
|
|
|
|
use FileHandle;
|
|
use IPC::Open2;
|
|
use Text::Diff;
|
|
foreach (@pairs) {
|
|
my $source = $_->[0];
|
|
my $expected = $_->[1];
|
|
my $pid = open2(\*Reader, \*Writer, "perl $c_compress 'C'");
|
|
print Writer $source;
|
|
close Writer;
|
|
|
|
local $/ = undef; # slurp
|
|
my $got = <Reader>;
|
|
|
|
if ($got ne $expected) {
|
|
print "MISMATCH:\n", diff \$expected, \$got;
|
|
}
|
|
}
|