Commit 313194d7 authored by Georgi Chorbadzhiyski's avatar Georgi Chorbadzhiyski Committed by Rémi Denis-Courmont

Do not truncate the last character in net_Gets().

Signed-off-by: Rémi Denis-Courmont's avatarRémi Denis-Courmont <remi@remlab.net>
parent ecc0305a
......@@ -481,9 +481,9 @@ 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';
buf[buflen - 1] = '\0';
return buf;
error:
free(buf);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment