From 351ff7685846cc96e0c633cd975fc532e2b4bb08 Mon Sep 17 00:00:00 2001
From: Allanis <allanis@saracraft.net>
Date: Sat, 23 Feb 2013 00:43:32 +0000
Subject: [PATCH] [Fix] Potential bug with a libvorbis segfault.

---
 src/music.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/music.c b/src/music.c
index 260bbce..21393fb 100644
--- a/src/music.c
+++ b/src/music.c
@@ -46,11 +46,12 @@ static size_t ovpack_read(void* ptr, size_t size, size_t nmemb, void* datasource
 	return (ssize_t) pack_read(datasource, ptr, size*nmemb);
 }
 
+static int ovpack_retneg(void) { return -1; } // Must return -1.
 ov_callbacks ovcall = {
 	.read_func 	= ovpack_read,
-	.seek_func 	= NULL,
+	.seek_func 	= (int(*)(void*, ogg_int64_t, int)) ovpack_retneg,
 	.close_func	= NULL,
-	.tell_func	= NULL
+	.tell_func	= (long(*)(void*))ovpack_retneg
 };
 
 static int stream_loadBuffer(ALuint buffer);