changeset 1213:fe9ebf4ce09e libavformat

negative to_pad won't provoke infinite loop
author bcoudurier
date Tue, 01 Aug 2006 10:00:12 +0000
parents b4f48eb1f411
children 4dbf4b5e675d
files gxfenc.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/gxfenc.c	Tue Aug 01 09:56:27 2006 +0000
+++ b/gxfenc.c	Tue Aug 01 10:00:12 2006 +0000
@@ -117,7 +117,7 @@
 
 static void gxf_write_padding(ByteIOContext *pb, offset_t to_pad)
 {
-    while (to_pad--) {
+    for (; to_pad > 0; to_pad--) {
         put_byte(pb, 0);
     }
 }