Revision 490a022d libavutil/file.c

View differences:

libavutil/file.c
47 47
    av_unused void *ptr;
48 48
    off_t off_size;
49 49
    char errbuf[128];
50
    size_t max_size = HAVE_MMAP ? SIZE_MAX : FF_INTERNAL_MEM_TYPE_MAX_VALUE;
51 50
    *bufptr = NULL;
52 51

  
53 52
    if (fd < 0) {
......
66 65
    }
67 66

  
68 67
    off_size = st.st_size;
69
    if (off_size > max_size) {
68
    if (off_size > SIZE_MAX) {
70 69
        av_log(&file_log_ctx, AV_LOG_ERROR,
71 70
               "File size for file '%s' is too big\n", filename);
72 71
        close(fd);

Also available in: Unified diff