Index: /libmpc/branches/r2d/libmpcdec/mpc_demux.c
===================================================================
--- /libmpc/branches/r2d/libmpcdec/mpc_demux.c	(revision 266)
+++ /libmpc/branches/r2d/libmpcdec/mpc_demux.c	(revision 267)
@@ -227,5 +227,7 @@
 	d->seek_table_size = (mpc_uint32_t) tmp;
 	d->seek_pwr = d->si.block_pwr + mpc_bits_read(&r, 4);
-	d->seek_table = malloc((size_t)(2 + d->si.samples / (MPC_FRAME_LENGTH << d->seek_pwr)) * sizeof(mpc_uint32_t));
+	tmp = 2 + d->si.samples / (MPC_FRAME_LENGTH << d->seek_pwr);
+	if (tmp < d->seek_table_size) tmp = d->seek_table_size;
+	d->seek_table = malloc((size_t)(tmp * sizeof(mpc_uint32_t)));
 
 	table = d->seek_table;
