From cb9ab5c705e4a2913645761ac519c00263f6928b Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Fri, 20 Dec 2019 18:02:00 +0100 Subject: openpgp: Make tracing more robust. --- openpgp/src/parse/parse.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'openpgp/src/parse') 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()? }; -- cgit v1.2.3