[vlc-devel] http access problem with 2.1.0-git-552-gecc0305

Georgi Chorbadzhiyski gf at unixsol.org
Sat Aug 17 20:33:02 CEST 2013


Around 08/17/2013 09:28 PM, Georgi Chorbadzhiyski scribbled:
> Around 08/17/2013 09:24 PM, Georgi Chorbadzhiyski scribbled:
>> Around 08/17/2013 09:17 PM, Georgi Chorbadzhiyski scribbled:
>>> Today I updated my vlc to revision 2.1.0-git-552-gecc0305 and it seems
>>> there is a problem with http access.
>>
>> Reverting these four commits that touch src/network/io.c
>> fixes the bug I'm seeing:
>>
>> 9311e60 net_Read: break potential dead lock with waitall = true
>> e8f36f6 net_Recv(): improve error handling (fixes #9081)
>> 3328b21 net_Read: rewrite, fix corner cases (fix #8972)
>> ab7d3c3 net_Gets: rewrite, deal with errors
>>
>> I'll try to narrow it down further.
> 
> The commit that causes problems for me is
> ab7d3c3 net_Gets: rewrite, deal with errors.
> 
> git revert ab7d3c3
> 
> returns http access to working state. I'll try to find the bug...

The attached patch fixes the issue for me.

-- 
Georgi Chorbadzhiyski
http://github.com/gfto/
http://georgi.unixsol.org/
-------------- next part --------------
>From fb4f5ea67dd95e2de91fd6ab5ccd247a8a421e1f Mon Sep 17 00:00:00 2001
From: Georgi Chorbadzhiyski <gf at unixsol.org>
Date: Sat, 17 Aug 2013 21:31:51 +0300
Subject: [PATCH] Do not truncate the last character in net_Gets().

---
 src/network/io.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/network/io.c b/src/network/io.c
index 740c990..ae8a646 100644
--- a/src/network/io.c
+++ b/src/network/io.c
@@ -481,7 +481,7 @@ char *net_Gets(vlc_object_t *obj, int fd, const v_socket_t *vs)
         buflen++;
     }
 
-    buf[--buflen] = '\0';
+    buf[buflen] = '\0';
     if (buflen > 0 && buf[buflen - 1] == '\r')
         buf[buflen] = '\0';
     return buf;
-- 
1.8.3.2



More information about the vlc-devel mailing list