Hi,
Function SSL_write() returns the value of 0 and less than 0 are both on error. 
However , the return value of function SSL_write() is not checked correctly, 
which forgot to check the return value 0. See the following code:

line : 1098, 1101
https://github.com/apache/trafficserver/blob/5ee6a5f554880b02535e6ee84268df922e87274d/tools/http_load/http_load.c#L1097-L1106

The same situation is  also occured on line 1216, 1219

https://github.com/apache/trafficserver/blob/5ee6a5f554880b02535e6ee84268df922e87274d/tools/http_load/http_load.c#L1215-L1224

===============================================================================

We find the return value of this call been checked in openssl project with the 
version of openssl 1.1.2.
Such as in openssl/apps folder

Ref : 
https://github.com/openssl/openssl/blob/0db957dbbcf6a432086ab913378c23636d8c374c/apps/s_time.c#L231-L232

```c
line 231:     if (buf_len <= 0 || SSL_write(scon, buf, buf_len) <= 0)
line 232:         goto end;
```


Chi Li, Zuxing Gu, Jiecheng Wu



[ Full content available at: 
https://github.com/apache/trafficserver/issues/4294 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to