diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
index 9cff50e55d436f7ff59c7bb814e98986b83d723c..8587087d52d465112dd76294e294fd83b7077078 100644
--- a/libavcodec/vp3.c
+++ b/libavcodec/vp3.c
@@ -2363,7 +2363,7 @@ static int vp3_decode_init(AVCodecContext *avctx)
         &superblock_run_length_vlc_table[0][1], 4, 2,
         &superblock_run_length_vlc_table[0][0], 4, 2, 0);
 
-    init_vlc(&s->fragment_run_length_vlc, 5, 31,
+    init_vlc(&s->fragment_run_length_vlc, 5, 30,
         &fragment_run_length_vlc_table[0][1], 4, 2,
         &fragment_run_length_vlc_table[0][0], 4, 2, 0);