File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -131,14 +131,19 @@ ps_root_readerrorcb(struct psr_ctx *psr_ctx)
131131 /* psr_mdatalen could be smaller then psr_datalen
132132 * if the above malloc failed. */
133133 iov [1 ].iov_len =
134- MIN (psr_ctx -> psr_mdatalen , psr_ctx -> psr_datalen );
134+ MIN (psr_ctx -> psr_mdatalen , psr_error -> psr_datalen );
135135 } else {
136136 iov [1 ].iov_base = psr_ctx -> psr_data ;
137- iov [1 ].iov_len = psr_ctx -> psr_datalen ;
137+ /* This should never be the case */
138+ iov [1 ].iov_len =
139+ MIN (psr_ctx -> psr_datalen , psr_error -> psr_datalen );
138140 }
139141 }
140142
141143recv :
144+ /* fd is SOCK_SEQPACKET and we mark the boundary with MSG_EOR
145+ * so this can never stall if the receive buffers are bigger
146+ * than the actual message. */
142147 len = recvmsg (fd , & msg , MSG_WAITALL );
143148 if (len == -1 )
144149 PSR_ERROR (errno );
You can’t perform that action at this time.
0 commit comments