Merge commit '5f30c6c8ed1f006c1b3a547dfe388f3a4a080e4d'
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 28 May 2013 05:48:51 +0000 (07:48 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 28 May 2013 05:49:38 +0000 (07:49 +0200)
Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavcodec/smacker.c

@@@ -725,23 -686,15 +725,23 @@@ static int smka_decode_frame(AVCodecCon
                      res = get_vlc2(&gb, vlc[1].table, SMKTREE_BITS, 3);
                  else
                      res = 0;
 +                if (res < 0) {
 +                    av_log(avctx, AV_LOG_ERROR, "invalid vlc\n");
 +                    return AVERROR_INVALIDDATA;
 +                }
                  pred[1] += sign_extend(h[1].values[res], 8);
-                 *samples8++ = av_clip_uint8(pred[1]);
+                 *samples8++ = pred[1];
              } else {
                  if(vlc[0].table)
                      res = get_vlc2(&gb, vlc[0].table, SMKTREE_BITS, 3);
                  else
                      res = 0;
 +                if (res < 0) {
 +                    av_log(avctx, AV_LOG_ERROR, "invalid vlc\n");
 +                    return AVERROR_INVALIDDATA;
 +                }
                  pred[0] += sign_extend(h[0].values[res], 8);
-                 *samples8++ = av_clip_uint8(pred[0]);
+                 *samples8++ = pred[0];
              }
          }
      }