poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <francesco.petru...@innovery.net>
Subject Problems with Protect records in excel
Date Wed, 28 Oct 2015 08:58:33 GMT
I found there are some cases in which the protect, object protect, window
protect BIFF records can contain no data,
In most case this happen when protection is applied through vba routines
with old Excel version.
I think must be considered the option to set the protection flag if record
is present but not contains data.
For example the org.apache.poi.hssf.record.ProtectRecord class can be
patched in this way:

public ProtectRecord(RecordInputStream in) {
	 this._options = 1;
	 try {
		 this._options = in.readShort();
	 } catch (RecordFormatException e) {
		 //System.out.println("Wrong Protect record found, set and
skip check ");
	 }
}

or check for availability of data in RecordInputStream in.

Best Regards

Francesco Petruzzi

Information Security Manager
Innovery SpA




---
Questa e-mail รจ stata controllata per individuare virus con Avast antivirus.
https://www.avast.com/antivirus


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Mime
View raw message