Index: /libmpc/trunk/libmpcdec/mpc_bits_reader.c
===================================================================
--- /libmpc/trunk/libmpcdec/mpc_bits_reader.c	(revision 423)
+++ /libmpc/trunk/libmpcdec/mpc_bits_reader.c	(revision 424)
@@ -1,4 +1,4 @@
 /*
-  Copyright (c) 2007, The Musepack Development Team
+  Copyright (c) 2007-2009, The Musepack Development Team
   All rights reserved.
 
@@ -170,5 +170,6 @@
 	size += mpc_bits_get_size(r, &(p_block->size));
 
-	p_block->size -= size;
+	if (p_block->size >= size) // check if the block size doesn't conflict with the header size
+		p_block->size -= size;
 
 	return size;
Index: /libmpc/trunk/libmpcdec/mpc_demux.c
===================================================================
--- /libmpc/trunk/libmpcdec/mpc_demux.c	(revision 423)
+++ /libmpc/trunk/libmpcdec/mpc_demux.c	(revision 424)
@@ -1,4 +1,4 @@
 /*
-  Copyright (c) 2005, The Musepack Development Team
+  Copyright (c) 2005-2009, The Musepack Development Team
   All rights reserved.
 
@@ -119,5 +119,5 @@
  * @return MPC_STATUS_INVALIDSV if the key is invalid, MPC_STATUS_OK else
  */
-static inline mpc_status mpc_check_key(char * key)
+static mpc_inline mpc_status mpc_check_key(char * key)
 {
 	if (key[0] < 65 || key[0] > 90 || key[1] < 65 || key[1] > 90)
Index: /libmpc/trunk/mpcgain/mpcgain.c
===================================================================
--- /libmpc/trunk/mpcgain/mpcgain.c	(revision 423)
+++ /libmpc/trunk/mpcgain/mpcgain.c	(revision 424)
@@ -1,4 +1,4 @@
 /*
-  Copyright (c) 2006, The Musepack Development Team
+  Copyright (c) 2006-2009, The Musepack Development Team
   All rights reserved.
 
@@ -52,5 +52,5 @@
 #define MAX_HEAD_SIZE 20 // maximum size of the packet header before chapter gain (2 + 9 + 9)
 
-const char    About []        = "mpcgain - Musepack (MPC) ReplayGain calculator v" MPCGAIN_VERSION " (C) 2006-2008 MDT\nBuilt " __DATE__ " " __TIME__ "\n";
+const char    About []        = "mpcgain - Musepack (MPC) ReplayGain calculator v" MPCGAIN_VERSION " (C) 2006-2009 MDT\nBuilt " __DATE__ " " __TIME__ "\n";
 
 
