From: =?utf-8?q?Martin_Stegh=C3=B6fer?= <martin@steghoefer.eu>
Date: Mon, 14 Mar 2016 20:22:12 +0100
Subject: vcut: Fix segmentation fault because of out-of-range index in header
 writing

Bug-Debian: https://bugs.debian.org/818037
Bug: https://trac.xiph.org/ticket/2264
Forwarded: https://trac.xiph.org/ticket/2264
---
 vcut/vcut.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vcut/vcut.c b/vcut/vcut.c
index d7ba699..17426b9 100644
--- a/vcut/vcut.c
+++ b/vcut/vcut.c
@@ -178,7 +178,7 @@ static int submit_headers_to_stream(vcut_state *s)
 	for(i=0;i<4;i++)
 	{
 		ogg_packet p;
-		if(i < 4)  /* a header packet */
+		if(i < 3)  /* a header packet */
 		{
 			p.bytes = vs->headers[i].length;
 			p.packet = vs->headers[i].packet;
