summaryrefslogtreecommitdiffstats
path: root/openpgp/src/parse
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2019-12-20 18:02:00 +0100
committerJustus Winter <justus@sequoia-pgp.org>2019-12-20 18:21:04 +0100
commitcb9ab5c705e4a2913645761ac519c00263f6928b (patch)
tree58d5ed36296fcdc595ca27ea4198a12c0c88bb96 /openpgp/src/parse
parentd806e87242c95e0a282a437279d8bf87b4898bcd (diff)
openpgp: Make tracing more robust.
Diffstat (limited to 'openpgp/src/parse')
-rw-r--r--openpgp/src/parse/parse.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/openpgp/src/parse/parse.rs b/openpgp/src/parse/parse.rs
index a7b45ce2..25ca01f8 100644
--- a/openpgp/src/parse/parse.rs
+++ b/openpgp/src/parse/parse.rs
@@ -3700,13 +3700,13 @@ impl <'a> PacketParser<'a> {
let unread_content = if self.state.settings.buffer_unread_content {
t!("({:?} at depth {}): buffering {} bytes of unread content",
self.packet.tag(), recursion_depth,
- self.data_eof().unwrap().len());
+ self.data_eof().unwrap_or(&[]).len());
self.buffer_unread_content()?.len() > 0
} else {
t!("({:?} at depth {}): dropping {} bytes of unread content",
self.packet.tag(), recursion_depth,
- self.data_eof().unwrap().len());
+ self.data_eof().unwrap_or(&[]).len());
self.drop_eof()?
};