fixes for svace errors found

This commit is contained in:
HisShadow 2024-01-10 09:54:54 +03:00
parent 5001d168de
commit e51d73197e
2 changed files with 15 additions and 1 deletions

View file

@ -1355,7 +1355,7 @@ Patch2: rh1648644-java_access_bridge_privileged_security.patch
Patch3: rh649512-remove_uses_of_far_in_jpeg_libjpeg_turbo_1_4_compat_for_jdk10_and_up.patch Patch3: rh649512-remove_uses_of_far_in_jpeg_libjpeg_turbo_1_4_compat_for_jdk10_and_up.patch
# Depend on pcsc-lite-libs instead of pcsc-lite-devel as this is only in optional repo # Depend on pcsc-lite-libs instead of pcsc-lite-devel as this is only in optional repo
Patch6: rh1684077-openjdk_should_depend_on_pcsc-lite-libs_instead_of_pcsc-lite-devel.patch Patch6: rh1684077-openjdk_should_depend_on_pcsc-lite-libs_instead_of_pcsc-lite-devel.patch
Patch7: svace-fixes.patch
############################################# #############################################
# #
# OpenJDK patches in need of upstreaming # OpenJDK patches in need of upstreaming
@ -1769,6 +1769,7 @@ pushd %{top_level_dir_name}
%patch2 -p1 %patch2 -p1
%patch3 -p1 %patch3 -p1
%patch6 -p1 %patch6 -p1
%patch7 -p1
# nss.cfg PKCS11 support; must come last as it also alters java.security # nss.cfg PKCS11 support; must come last as it also alters java.security
%patch1000 -p1 %patch1000 -p1
popd # openjdk popd # openjdk

13
svace-fixes.patch Normal file
View file

@ -0,0 +1,13 @@
diff --git a/src/java.base/share/classes/sun/security/x509/X509CertImpl.java b/src/java.base/share/classes/sun/security/x509/X509CertImpl.java
index 254016d..5f11fdc 100644
--- a/src/java.base/share/classes/sun/security/x509/X509CertImpl.java
+++ b/src/java.base/share/classes/sun/security/x509/X509CertImpl.java
@@ -749,7 +749,7 @@ public class X509CertImpl extends X509Certificate implements DerEncoder {
id = attr.getPrefix();
if (id.equalsIgnoreCase(INFO)) {
- if (attr.getSuffix() != null) {
+ if (attr.getSuffix() == null) {
info = null;
} else {
info.delete(attr.getSuffix());