Bug 4727

Summary: socket: consider write size of zero as error
Product: Claws Mail Reporter: olaf
Component: OtherAssignee: users
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 4.3.0   
Hardware: PC   
OS: All   
Attachments: gtk2-socket-consider-write-size-of-zero-as-error.patch
master-socket-consider-write-size-of-zero-as-error.patch

Description olaf 2024-01-06 12:56:25 UTC
Created attachment 2384 [details]
gtk2-socket-consider-write-size-of-zero-as-error.patch

As a followup to bug#4726, handle a write size of zero for all transmission paths as error. This matches other parts of the code base, such as fd_write_all.

Neither the gnutls nor the POSIX documentation mentions a write size of
zero specifically. It is apparently up to each application to decide
what to do with such short write results. So in case of Claws Mail,
consider it an error in all cases.
Comment 1 olaf 2024-01-06 12:56:52 UTC
Created attachment 2385 [details]
master-socket-consider-write-size-of-zero-as-error.patch