From 7c9cbd532288914ab05fc32686ba7501b667cc0f Mon Sep 17 00:00:00 2001 From: Kui LIU Date: Sat, 14 Oct 2017 19:59:42 +0200 Subject: [PATCH] Remove the 'public' modifier to make fields package protected. The two mutable static fields could be changed by malicious code or by accident. These fields could be made package protected to avoid this vulnerability. http://findbugs.sourceforge.net/bugDescriptions.html#MS_PKGPROTECT --- src/scratchpad/src/org/apache/poi/hmef/CompressedRTF.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/scratchpad/src/org/apache/poi/hmef/CompressedRTF.java b/src/scratchpad/src/org/apache/poi/hmef/CompressedRTF.java index ad38755a0fa..18d3d1eb773 100644 --- a/src/scratchpad/src/org/apache/poi/hmef/CompressedRTF.java +++ b/src/scratchpad/src/org/apache/poi/hmef/CompressedRTF.java @@ -33,9 +33,9 @@ Licensed to the Apache Software Foundation (ASF) under one or more * handles decompressing it for you. */ public final class CompressedRTF extends LZWDecompresser { - public static final byte[] COMPRESSED_SIGNATURE = + static final byte[] COMPRESSED_SIGNATURE = new byte[] { (byte)'L', (byte)'Z', (byte)'F', (byte)'u' }; - public static final byte[] UNCOMPRESSED_SIGNATURE = + static final byte[] UNCOMPRESSED_SIGNATURE = new byte[] { (byte)'M', (byte)'E', (byte)'L', (byte)'A' }; public static final int COMPRESSED_SIGNATURE_INT = LittleEndian.getInt(COMPRESSED_SIGNATURE);