Mercurial > libdvdread4.hg
comparison dvd_udf.c @ 49:1acf15da93ba src
fixed buffer size dimension in UDFGetPVD(); patch A00 by John Stebbins
author | nicodvb |
---|---|
date | Fri, 28 May 2010 13:24:16 +0000 |
parents | d71db8e4e1c7 |
children | 3bc841283972 |
comparison
equal
deleted
inserted
replaced
48:d71db8e4e1c7 | 49:1acf15da93ba |
---|---|
928 uint8_t pvd_buf_base[DVD_VIDEO_LB_LEN + 2048]; | 928 uint8_t pvd_buf_base[DVD_VIDEO_LB_LEN + 2048]; |
929 uint8_t *pvd_buf = (uint8_t *)(((uintptr_t)pvd_buf_base & ~((uintptr_t)2047)) + 2048); | 929 uint8_t *pvd_buf = (uint8_t *)(((uintptr_t)pvd_buf_base & ~((uintptr_t)2047)) + 2048); |
930 if(GetUDFCache(device, PVDCache, 0, pvd)) | 930 if(GetUDFCache(device, PVDCache, 0, pvd)) |
931 return 1; | 931 return 1; |
932 | 932 |
933 if(!UDFGetDescriptor( device, 1, pvd_buf, sizeof(pvd_buf))) | 933 if(!UDFGetDescriptor( device, 1, pvd_buf, DVD_VIDEO_LB_LEN)) |
934 return 0; | 934 return 0; |
935 | 935 |
936 memcpy(pvd->VolumeIdentifier, &pvd_buf[24], 32); | 936 memcpy(pvd->VolumeIdentifier, &pvd_buf[24], 32); |
937 memcpy(pvd->VolumeSetIdentifier, &pvd_buf[72], 128); | 937 memcpy(pvd->VolumeSetIdentifier, &pvd_buf[72], 128); |
938 SetUDFCache(device, PVDCache, 0, pvd); | 938 SetUDFCache(device, PVDCache, 0, pvd); |