diff options
Diffstat (limited to 'src/pinentry.rs')
-rw-r--r-- | src/pinentry.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/pinentry.rs b/src/pinentry.rs index f7d36c7..e2a83ed 100644 --- a/src/pinentry.rs +++ b/src/pinentry.rs @@ -137,6 +137,14 @@ where .read(&mut data[len..]) .await .map_err(|source| Error::PinentryReadOutput { source })?; + if bytes == 0 { + return Err(Error::PinentryReadOutput { + source: std::io::Error::new( + std::io::ErrorKind::UnexpectedEof, + "unexpected EOF", + ), + }); + } len += bytes; } } |