File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -107,8 +107,12 @@ ps_root_readerrorcb(struct psr_ctx *psr_ctx)
107107
108108 /* After this point, we MUST do another recvmsg even on a failure
109109 * to remove the message after peeking. */
110- if ((size_t )len < sizeof (* psr_error ))
111- goto recv ;
110+ if ((size_t )len < sizeof (* psr_error )) {
111+ /* We can't use the header to work out buffers, so
112+ * remove the message and bail. */
113+ (void )recvmsg (fd , & msg , MSG_WAITALL );
114+ PSR_ERROR (EINVAL );
115+ }
112116
113117 if (psr_ctx -> psr_usemdata &&
114118 psr_error -> psr_datalen > psr_ctx -> psr_mdatalen )
@@ -139,7 +143,6 @@ ps_root_readerrorcb(struct psr_ctx *psr_ctx)
139143 iov [1 ].iov_len = psr_error -> psr_datalen ;
140144 }
141145
142- recv :
143146 len = recvmsg (fd , & msg , MSG_WAITALL );
144147 if (len == -1 )
145148 PSR_ERROR (errno );
You can’t perform that action at this time.
0 commit comments