libavformat/nutdec.c:478: error: Integer Overflow L1
  ([-oo, -8] - [0, +oo]):unsigned64.

libavformat/nutdec.c:472:30: <LHS trace>
470.     int64_t end, tmp;
471. 
472.     nut->last_syncpoint_pos= url_ftell(bc)-8;
                                  ^
473. 
474.     end= get_packetheader(nut, bc, 1, SYNCPOINT_STARTCODE);

libavformat/nutdec.c:472:30: Call
470.     int64_t end, tmp;
471. 
472.     nut->last_syncpoint_pos= url_ftell(bc)-8;
                                  ^
473. 
474.     end= get_packetheader(nut, bc, 1, SYNCPOINT_STARTCODE);

libavformat/aviobuf.c:186:12: Call
  184. int64_t url_ftell(ByteIOContext *s)
  185. {
  186.     return url_fseek(s, 0, SEEK_CUR);
                  ^
  187. }
  188. 

libavformat/aviobuf.c:134:9: Assignment
    132. 
    133.     if(!s)
    134.         return AVERROR(EINVAL);
                 ^
    135. 
    136.     pos = s->pos - (s->write_flag ? 0 : (s->buf_end - s->buffer));

libavformat/aviobuf.c:186:5: Assignment
  184. int64_t url_ftell(ByteIOContext *s)
  185. {
  186.     return url_fseek(s, 0, SEEK_CUR);
           ^
  187. }
  188. 

libavformat/nutdec.c:472:5: Assignment
470.     int64_t end, tmp;
471. 
472.     nut->last_syncpoint_pos= url_ftell(bc)-8;
         ^
473. 
474.     end= get_packetheader(nut, bc, 1, SYNCPOINT_STARTCODE);

libavformat/nutdec.c:478:45: <RHS trace>
476. 
477.     tmp= ff_get_v(bc);
478.     *back_ptr= nut->last_syncpoint_pos - 16*ff_get_v(bc);
                                                 ^
479.     if(*back_ptr < 0)
480.         return -1;

libavformat/nutdec.c:478:45: Call
476. 
477.     tmp= ff_get_v(bc);
478.     *back_ptr= nut->last_syncpoint_pos - 16*ff_get_v(bc);
                                                 ^
479.     if(*back_ptr < 0)
480.         return -1;

libavformat/aviobuf.c:506:5: Assignment
  504. 
  505. uint64_t ff_get_v(ByteIOContext *bc){
  506.     uint64_t val = 0;
           ^
  507.     int tmp;
  508. 

libavformat/aviobuf.c:511:9: Assignment
  509.     do{
  510.         tmp = get_byte(bc);
  511.         val= (val<<7) + (tmp&127);
               ^
  512.     }while(tmp&128);
  513.     return val;

libavformat/aviobuf.c:513:5: Assignment
  511.         val= (val<<7) + (tmp&127);
  512.     }while(tmp&128);
  513.     return val;
           ^
  514. }
  515. 

libavformat/nutdec.c:478:5: Binary operation: ([-oo, -8] - [0, +oo]):unsigned64
476. 
477.     tmp= ff_get_v(bc);
478.     *back_ptr= nut->last_syncpoint_pos - 16*ff_get_v(bc);
         ^
479.     if(*back_ptr < 0)
480.         return -1;

static int decode_syncpoint(NUTContext *nut, int64_t *ts, int64_t *back_ptr){
    AVFormatContext *s= nut->avf;
    ByteIOContext *bc = s->pb;
    int64_t end, tmp;
    nut->last_syncpoint_pos= url_ftell(bc)-8;
    end= get_packetheader(nut, bc, 1, SYNCPOINT_STARTCODE);
    end += url_ftell(bc);
    tmp= ff_get_v(bc);
    *back_ptr= nut->last_syncpoint_pos - 16*ff_get_v(bc);
    if(*back_ptr < 0)
        return -1;
    ff_nut_reset_ts(nut, nut->time_base[tmp % nut->time_base_count], tmp / nut->time_base_count);
    if(skip_reserved(bc, end) || get_checksum(bc)){
        av_log(s, AV_LOG_ERROR, "sync point checksum mismatch\n");
        return -1;
    }
    *ts= tmp / s->nb_streams * av_q2d(nut->time_base[tmp % s->nb_streams])*AV_TIME_BASE;
    ff_nut_add_sp(nut, nut->last_syncpoint_pos, *back_ptr, *ts);
    return 0;
}
['static int decode_syncpoint(NUTContext *nut, int64_t *ts, int64_t *back_ptr){\n    AVFormatContext *s= nut->avf;\n    ByteIOContext *bc = s->pb;\n    int64_t end, tmp;\n    nut->last_syncpoint_pos= url_ftell(bc)-8;\n    end= get_packetheader(nut, bc, 1, SYNCPOINT_STARTCODE);\n    end += url_ftell(bc);\n    tmp= ff_get_v(bc);\n    *back_ptr= nut->last_syncpoint_pos - 16*ff_get_v(bc);\n    if(*back_ptr < 0)\n        return -1;\n    ff_nut_reset_ts(nut, nut->time_base[tmp % nut->time_base_count], tmp / nut->time_base_count);\n    if(skip_reserved(bc, end) || get_checksum(bc)){\n        av_log(s, AV_LOG_ERROR, "sync point checksum mismatch\\n");\n        return -1;\n    }\n    *ts= tmp / s->nb_streams * av_q2d(nut->time_base[tmp % s->nb_streams])*AV_TIME_BASE;\n    ff_nut_add_sp(nut, nut->last_syncpoint_pos, *back_ptr, *ts);\n    return 0;\n}', 'int64_t url_ftell(ByteIOContext *s)\n{\n    return url_fseek(s, 0, SEEK_CUR);\n}', 'int64_t url_fseek(ByteIOContext *s, int64_t offset, int whence)\n{\n    int64_t offset1;\n    int64_t pos;\n    if(!s)\n        return AVERROR(EINVAL);\n    pos = s->pos - (s->write_flag ? 0 : (s->buf_end - s->buffer));\n    if (whence != SEEK_CUR && whence != SEEK_SET)\n        return AVERROR(EINVAL);\n    if (whence == SEEK_CUR) {\n        offset1 = pos + (s->buf_ptr - s->buffer);\n        if (offset == 0)\n            return offset1;\n        offset += offset1;\n    }\n    offset1 = offset - pos;\n    if (!s->must_flush &&\n        offset1 >= 0 && offset1 < (s->buf_end - s->buffer)) {\n        s->buf_ptr = s->buffer + offset1;\n    } else if(s->is_streamed && !s->write_flag &&\n              offset1 >= 0 && offset1 < (s->buf_end - s->buffer) + (1<<16)){\n        while(s->pos < offset && !s->eof_reached)\n            fill_buffer(s);\n        if (s->eof_reached)\n            return AVERROR(EPIPE);\n        s->buf_ptr = s->buf_end + offset - s->pos;\n    } else {\n        int64_t res = AVERROR(EPIPE);\n#if defined(CONFIG_MUXERS) || defined(CONFIG_NETWORK)\n        if (s->write_flag) {\n            flush_buffer(s);\n            s->must_flush = 1;\n        }\n#endif\n        if (!s->seek || (res = s->seek(s->opaque, offset, SEEK_SET)) < 0)\n            return res;\n        if (!s->write_flag)\n            s->buf_end = s->buffer;\n        s->buf_ptr = s->buffer;\n        s->pos = offset;\n    }\n    s->eof_reached = 0;\n    return offset;\n}', 'uint64_t ff_get_v(ByteIOContext *bc){\n    uint64_t val = 0;\n    int tmp;\n    do{\n        tmp = get_byte(bc);\n        val= (val<<7) + (tmp&127);\n    }while(tmp&128);\n    return val;\n}']