Merge commit '7b337b122959b9bf634c31b549892df974f35b40' into release/1.1
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 12 Jan 2014 15:16:58 +0000 (16:16 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 12 Jan 2014 15:16:58 +0000 (16:16 +0100)
* commit '7b337b122959b9bf634c31b549892df974f35b40':
  truemotion1: make sure index does not go out of bounds
  pcx: round up in bits->bytes conversion in a buffer size check
  omadec: Fix wrong number of array elements
  omadec: check GEOB sizes against buffer size
  ac3dec: fix outptr increment.
  avio: Use AVERROR_PROTOCOL_NOT_FOUND

Conflicts:
libavcodec/ac3dec.c
libavcodec/pcx.c
libavformat/omadec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavcodec/truemotion1.c
libavformat/omadec.c

@@@ -513,11 -512,16 +513,20 @@@ hres,vres,i,i%vres (0 < i < 4
      index = s->index_stream[index_stream_index++] * 4; \
  }
  
+ #define INC_INDEX                                                   \
+ do {                                                                \
+     if (index >= 1023) {                                            \
+         av_log(s->avctx, AV_LOG_ERROR, "Invalid index value.\n");   \
+         return;                                                     \
+     }                                                               \
+     index++;                                                        \
+ } while (0)
  #define APPLY_C_PREDICTOR() \
 +    if(index > 1023){\
 +        av_log(s->avctx, AV_LOG_ERROR, " index %d went out of bounds\n", index); \
 +        return; \
 +    }\
      predictor_pair = s->c_predictor_table[index]; \
      horiz_pred += (predictor_pair >> 1); \
      if (predictor_pair & 1) { \
              if (predictor_pair & 1) \
                  GET_NEXT_INDEX() \
              else \
-                 index++; \
+                 INC_INDEX; \
          } \
      } else \
-         index++;
+         INC_INDEX;
  
  #define APPLY_C_PREDICTOR_24() \
 +    if(index > 1023){\
 +        av_log(s->avctx, AV_LOG_ERROR, " index %d went out of bounds\n", index); \
 +        return; \
 +    }\
      predictor_pair = s->c_predictor_table[index]; \
      horiz_pred += (predictor_pair >> 1); \
      if (predictor_pair & 1) { \
              if (predictor_pair & 1) \
                  GET_NEXT_INDEX() \
              else \
-                 index++; \
+                 INC_INDEX; \
          } \
      } else \
-         index++;
+         INC_INDEX;
  
  #define APPLY_Y_PREDICTOR_24() \
 +    if(index > 1023){\
 +        av_log(s->avctx, AV_LOG_ERROR, " index %d went out of bounds\n", index); \
 +        return; \
 +    }\
      predictor_pair = s->y_predictor_table[index]; \
      horiz_pred += (predictor_pair >> 1); \
      if (predictor_pair & 1) { \
Simple merge