VirtualBox

Ignore:
Timestamp:
Jun 9, 2022 9:09:44 AM (3 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
151769
Message:

libs/zlib: Upgrade to 1.2.12, bugref:8515

Location:
trunk/src/libs/zlib-1.2.12
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libs/zlib-1.2.12

    • Property svn:mergeinfo
      •  

        old new  
        2020/branches/dsen/gui3/src/libs/zlib-1.2.11:79645-79692
        2121/trunk/src/src/libs/zlib-1.2.11:92342
         22/vendor/zlib/1.2.12:151751
         23/vendor/zlib/current:150724-151750
  • trunk/src/libs/zlib-1.2.12/contrib/minizip/unzip.c

    r76163 r95239  
    456456                ((*(buf+i+2))==0x05) && ((*(buf+i+3))==0x06))
    457457            {
    458                 uPosFound = uReadPos+i;
     458                uPosFound = uReadPos+(unsigned)i;
    459459                break;
    460460            }
     
    524524                ((*(buf+i+2))==0x06) && ((*(buf+i+3))==0x07))
    525525            {
    526                 uPosFound = uReadPos+i;
     526                uPosFound = uReadPos+(unsigned)i;
    527527                break;
    528528            }
     
    854854    ZPOS64_T uDate;
    855855    uDate = (ZPOS64_T)(ulDosDate>>16);
    856     ptm->tm_mday = (uInt)(uDate&0x1f) ;
    857     ptm->tm_mon =  (uInt)((((uDate)&0x1E0)/0x20)-1) ;
    858     ptm->tm_year = (uInt)(((uDate&0x0FE00)/0x0200)+1980) ;
    859 
    860     ptm->tm_hour = (uInt) ((ulDosDate &0xF800)/0x800);
    861     ptm->tm_min =  (uInt) ((ulDosDate&0x7E0)/0x20) ;
    862     ptm->tm_sec =  (uInt) (2*(ulDosDate&0x1f)) ;
     856    ptm->tm_mday = (int)(uDate&0x1f) ;
     857    ptm->tm_mon =  (int)((((uDate)&0x1E0)/0x20)-1) ;
     858    ptm->tm_year = (int)(((uDate&0x0FE00)/0x0200)+1980) ;
     859
     860    ptm->tm_hour = (int) ((ulDosDate &0xF800)/0x800);
     861    ptm->tm_min =  (int) ((ulDosDate&0x7E0)/0x20) ;
     862    ptm->tm_sec =  (int) (2*(ulDosDate&0x1f)) ;
    863863}
    864864
     
    994994        if (lSeek!=0)
    995995        {
    996             if (ZSEEK64(s->z_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0)
     996            if (ZSEEK64(s->z_filefunc, s->filestream,(ZPOS64_T)lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0)
    997997                lSeek=0;
    998998            else
     
    10191019        if (lSeek!=0)
    10201020        {
    1021             if (ZSEEK64(s->z_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0)
     1021            if (ZSEEK64(s->z_filefunc, s->filestream,(ZPOS64_T)lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0)
    10221022                lSeek=0;
    10231023            else
     
    10911091        if (lSeek!=0)
    10921092        {
    1093             if (ZSEEK64(s->z_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0)
     1093            if (ZSEEK64(s->z_filefunc, s->filestream,(ZPOS64_T)lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0)
    10941094                lSeek=0;
    10951095            else
     
    17681768            if ((pfile_in_zip_read_info->stream.avail_in == 0) &&
    17691769                (pfile_in_zip_read_info->rest_read_compressed == 0))
    1770                 return (iRead==0) ? UNZ_EOF : iRead;
     1770                return (iRead==0) ? UNZ_EOF : (int)iRead;
    17711771
    17721772            if (pfile_in_zip_read_info->stream.avail_out <
     
    18581858
    18591859            uTotalOutAfter = pfile_in_zip_read_info->stream.total_out;
     1860            /* Detect overflow, because z_stream.total_out is uLong (32 bits) */
     1861            if (uTotalOutAfter<uTotalOutBefore)
     1862                uTotalOutAfter += 1LL << 32; /* Add maximum value of uLong + 1 */
    18601863            uOutThis = uTotalOutAfter-uTotalOutBefore;
    18611864
     
    18721875
    18731876            if (err==Z_STREAM_END)
    1874                 return (iRead==0) ? UNZ_EOF : iRead;
     1877                return (iRead==0) ? UNZ_EOF : (int)iRead;
    18751878            if (err!=Z_OK)
    18761879                break;
     
    18791882
    18801883    if (err==Z_OK)
    1881         return iRead;
     1884        return (int)iRead;
    18821885    return err;
    18831886}
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette