diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2023-02-07 17:10:59 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2023-02-07 17:10:59 -0800 |
commit | 67ffde62e837f4b466141366c238ff134cf36edd (patch) | |
tree | 94ad6689846adc8ce6e3c19158a1ba246af695e5 | |
parent | 4e297db3cf54a629a2c8f38b068cd4f8434afa4c (diff) |
DataFromClient: Avoid segfault if FlushFD() closed the connection
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | scope.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -1138,6 +1138,9 @@ DataFromClient(FD fd) FDinfo[ServerFD].bufstart = 0; FlushFD(ServerFD); + if (FDinfo[ServerFD].buffer == NULL) /* connection closed in FlushFD */ + return; + /* also report the bytes to standard out */ ReportFromClient(fd, FDinfo[ServerFD].buffer, n); } |