openbsd-ports/x11/mplayer/patches/patch-libmpdemux_realrtsp_rtsp_c

13 lines
489 B
Plaintext
Raw Normal View History

$OpenBSD: patch-libmpdemux_realrtsp_rtsp_c,v 1.3 2006/07/19 21:40:47 robert Exp $
--- libmpdemux/realrtsp/rtsp.c.orig Sun Jun 11 20:35:46 2006
+++ libmpdemux/realrtsp/rtsp.c Thu Jul 6 00:08:12 2006
@@ -280,7 +280,7 @@ static char *rtsp_get(rtsp_t *s) {
read_stream(s->s, buffer, 1);
while (n<BUF_SIZE) {
read_stream(s->s, &(buffer[n]), 1);
- if ((buffer[n-1]==0x0d)&&(buffer[n]==0x0a)) break;
+ if (n > 0 &&(buffer[n-1]==0x0d)&&(buffer[n]==0x0a)) break;
n++;
}