-
Notifications
You must be signed in to change notification settings - Fork 879
Closed
Labels
pdfPDF componentPDF component
Description
I've identified a potential issue in the file pdf_pkcs_certificate.dart, specifically in this section:
if (mechanism != null && mechanism!.startsWith('PBEwithMD2') ||
mechanism!.startsWith('PBEwithMD5') ||
mechanism!.startsWith('PBEwithSHA-1') ||
mechanism!.startsWith('PBEwithSHA-256')) {
if (mechanism!.endsWith('AES-CBC-BC') ||
mechanism!.endsWith('AES-CBC-OPENSSL')) {
result = _cipherUtils.getCipher('AES/CBC');
} else if (mechanism!.endsWith('DES-CBC')) {
result = _cipherUtils.getCipher('DES/CBC');
} else if (mechanism!.endsWith('DESEDE-CBC')) {
result = _cipherUtils.getCipher('DESEDE/CBC');
} else if (mechanism!.endsWith('RC2-CBC')) {
result = _cipherUtils.getCipher('RC2/CBC');
} else if (mechanism!.endsWith('RC4')) {
result = _cipherUtils.getCipher('RC4');
}
}
This code has the potential to throw "Unhandled Exception: Null check operator used on a null value" if mechanism is null.
Link to the file: pdf_pkcs_certificate.dart
Metadata
Metadata
Assignees
Labels
pdfPDF componentPDF component