Package: libg3d / 0.0.8-26

fix-possible-endless-loop-in-g3d_stream_seek.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
From: Eric Sesterhenn <SnakeByte@gmx.de>
Date: Sat, 12 Sep 2009 15:23:40 +0200
Subject: fix possible endless loop in g3d_stream_seek

Origin: upstream, http://svn.gna.org/viewcvs/libg3d/trunk/src/stream.c?rev=426&r1=402&r2=426
---
 src/stream.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/stream.c b/src/stream.c
index 48de709..75948f3 100644
--- a/src/stream.c
+++ b/src/stream.c
@@ -82,7 +82,7 @@ gint g3d_stream_skip(G3DStream *stream, goffset offset)
 				g_free(buffer);
 				return -1;
 			}
-			offset -= s;
+			todo -= s;
 		}
 		g_free(buffer);
 		return 0;