Package: libg3d / 0.0.8-20

endless-seek.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Description: 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
Author:  Eric Sesterhenn <SnakeByte@gmx.de>

---
diff --git a/src/stream.c b/src/stream.c
index 48de709a9084a72dbcf94b7856a26983d283d9e8..75948f3fa0a8c569e7eec0d8b3e4969288f32d7d 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;