raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=aec79f9d0d94d2f4717d61dc8aec7f6da3a80606

commit aec79f9d0d94d2f4717d61dc8aec7f6da3a80606
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
Date:   Sun Sep 17 18:14:37 2017 +0900

    efl net http - fix protocol error handling to not crash and handle it
    
    if http server doesnt send even a valid http response and just closes
    your conenction... dont segv with null pd->cm
    
    @fix
---
 src/lib/ecore_con/efl_net_dialer_http.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/lib/ecore_con/efl_net_dialer_http.c 
b/src/lib/ecore_con/efl_net_dialer_http.c
index 4d64a20aab..cbc3e033e8 100644
--- a/src/lib/ecore_con/efl_net_dialer_http.c
+++ b/src/lib/ecore_con/efl_net_dialer_http.c
@@ -1533,6 +1533,8 @@ _efl_net_dialer_http_pause_reset(Eo *o, 
Efl_Net_Dialer_Http_Data *pd)
    CURLMcode rm;
    Eina_Error err;
 
+   EINA_SAFETY_ON_TRUE_RETURN_VAL(pd->cm == NULL, EALREADY);
+
    re = curl_easy_pause(pd->easy, pd->pause);
    if (re != CURLE_OK)
      {
@@ -1654,6 +1656,11 @@ _efl_net_dialer_http_efl_io_writer_write(Eo *o, 
Efl_Net_Dialer_Http_Data *pd, Ei
    err = _efl_net_dialer_http_pause_reset(o, pd);
    if (err) goto error;
 
+   if (!pd->cm)
+     {
+        err = EISCONN;
+        goto error;
+     }
    pd->error = 0;
    rm = curl_multi_socket_action(pd->cm->multi,
                                  pd->fd,

-- 


Reply via email to