Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 70480 | Differences between
and this patch

Collapse All | Expand All

(-)pymedia-1.3.7.3/build.dat (-1 / +1 lines)
Line 1 Link Here
1
1862
1
1909
(-)pymedia-1.3.7.3/removable/cd/dvdlibs/dvdcss/css.c (-3 / +4 lines)
Lines 61-66 Link Here
61
#include "ioctl.h"
61
#include "ioctl.h"
62
#include "device.h"
62
#include "device.h"
63
63
64
64
/*****************************************************************************
65
/*****************************************************************************
65
 * Local prototypes
66
 * Local prototypes
66
 *****************************************************************************/
67
 *****************************************************************************/
Lines 380-386 Link Here
380
    p_title = p_newtitle;
381
    p_title = p_newtitle;
381
382
382
    /* Write in the new title and its key */
383
    /* Write in the new title and its key */
383
    p_newtitle = malloc( sizeof( dvd_title_t ) );
384
    p_newtitle = (dvd_title_t*) malloc( sizeof( dvd_title_t ) );
384
    p_newtitle->i_startlb = i_block;
385
    p_newtitle->i_startlb = i_block;
385
    memcpy( p_newtitle->p_key, p_title_key, KEY_SIZE );
386
    memcpy( p_newtitle->p_key, p_title_key, KEY_SIZE );
386
387
Lines 1089-1095 Link Here
1089
1090
1090
1091
1091
    /* initialize lookup tables for k[1] */
1092
    /* initialize lookup tables for k[1] */
1092
    K1table = malloc( 65536 * K1TABLEWIDTH );
1093
    K1table = (unsigned char*) malloc( 65536 * K1TABLEWIDTH );
1093
    memset( K1table, 0 , 65536 * K1TABLEWIDTH );
1094
    memset( K1table, 0 , 65536 * K1TABLEWIDTH );
1094
    if( K1table == NULL )
1095
    if( K1table == NULL )
1095
    {
1096
    {
Lines 1121-1127 Link Here
1121
    }
1122
    }
1122
1123
1123
    /* Initing our Really big table */
1124
    /* Initing our Really big table */
1124
    BigTable = malloc( 16777216 * sizeof(int) );
1125
    BigTable = (unsigned int*) malloc( 16777216 * sizeof(int) );
1125
    memset( BigTable, 0 , 16777216 * sizeof(int) );
1126
    memset( BigTable, 0 , 16777216 * sizeof(int) );
1126
    if( BigTable == NULL )
1127
    if( BigTable == NULL )
1127
    {
1128
    {
(-)pymedia-1.3.7.3/removable/cd/dvdlibs/dvdcss/libdvdcss.c (-9 / +12 lines)
Lines 175-181 Link Here
175
    /*
175
    /*
176
     *  Allocate the library structure
176
     *  Allocate the library structure
177
     */
177
     */
178
    dvdcss = malloc( sizeof( struct dvdcss_s ) );
178
    dvdcss = (dvdcss_s*) malloc( sizeof( struct dvdcss_s ) );
179
    if( dvdcss == NULL )
179
    if( dvdcss == NULL )
180
    {
180
    {
181
        return NULL;
181
        return NULL;
Lines 353-360 Link Here
353
        }
353
        }
354
        else
354
        else
355
        {
355
        {
356
            _dvdcss_debug( dvdcss, i_ret ? "disc is scrambled"
356
	    if (i_ret)
357
                                         : "disc is unscrambled" );
357
            _dvdcss_debug( dvdcss, (char *) "disc is scrambled" );
358
	    else
359
            _dvdcss_debug( dvdcss, (char *) "disc is unscrambled" );
360
358
            dvdcss->b_scrambled = i_ret;
361
            dvdcss->b_scrambled = i_ret;
359
        }
362
        }
360
    }
363
    }
Lines 444-450 Link Here
444
        {
447
        {
445
            if( psz_serial[i] < '0' || psz_serial[i] > '9' )
448
            if( psz_serial[i] < '0' || psz_serial[i] > '9' )
446
            {
449
            {
447
                sprintf( psz_serial,
450
                sprintf( (char *) psz_serial,
448
                         "%.2X%.2X%.2X%.2X%.2X%.2X%.2X%.2X",
451
                         "%.2X%.2X%.2X%.2X%.2X%.2X%.2X%.2X",
449
                         psz_serial[0], psz_serial[1], psz_serial[2],
452
                         psz_serial[0], psz_serial[1], psz_serial[2],
450
                         psz_serial[3], psz_serial[4], psz_serial[5],
453
                         psz_serial[3], psz_serial[4], psz_serial[5],
Lines 485-493 Link Here
485
        /* Pointer to the filename we will use. */
488
        /* Pointer to the filename we will use. */
486
        dvdcss->psz_block = dvdcss->psz_cachefile + i;
489
        dvdcss->psz_block = dvdcss->psz_cachefile + i;
487
490
488
        sprintf( psz_debug, "using CSS key cache dir: %s",
491
        sprintf( (char *) psz_debug, "using CSS key cache dir: %s",
489
                            dvdcss->psz_cachefile );
492
                            dvdcss->psz_cachefile );
490
        _dvdcss_debug( dvdcss, psz_debug );
493
        _dvdcss_debug( dvdcss, (char *) psz_debug );
491
    }
494
    }
492
    nocache:
495
    nocache:
493
496
Lines 607-613 Link Here
607
        {
610
        {
608
            if( ((uint8_t*)p_buffer)[0x14] & 0x30 )
611
            if( ((uint8_t*)p_buffer)[0x14] & 0x30 )
609
            {
612
            {
610
                _dvdcss_error( dvdcss, "no key but found encrypted block" );
613
                _dvdcss_error( dvdcss, (char *) "no key but found encrypted block" );
611
                /* Only return the initial range of unscrambled blocks? */
614
                /* Only return the initial range of unscrambled blocks? */
612
                /* or fail completely? return 0; */
615
                /* or fail completely? return 0; */
613
                break;
616
                break;
Lines 620-626 Link Here
620
        /* Decrypt the blocks we managed to read */
623
        /* Decrypt the blocks we managed to read */
621
        for( i_index = i_ret; i_index; i_index-- )
624
        for( i_index = i_ret; i_index; i_index-- )
622
        {
625
        {
623
            _dvdcss_unscramble( dvdcss->css.p_title_key, p_buffer );
626
            _dvdcss_unscramble( dvdcss->css.p_title_key, (uint8_t*) p_buffer );
624
            ((uint8_t*)p_buffer)[0x14] &= 0x8f;
627
            ((uint8_t*)p_buffer)[0x14] &= 0x8f;
625
            p_buffer = (void *) ((uint8_t *)p_buffer + DVDCSS_BLOCK_SIZE);
628
            p_buffer = (void *) ((uint8_t *)p_buffer + DVDCSS_BLOCK_SIZE);
626
        }
629
        }
Lines 695-701 Link Here
695
            iov_len = _p_iovec->iov_len;
698
            iov_len = _p_iovec->iov_len;
696
        }
699
        }
697
700
698
        _dvdcss_unscramble( dvdcss->css.p_title_key, iov_base );
701
        _dvdcss_unscramble( dvdcss->css.p_title_key, (uint8_t*) iov_base );
699
        ((uint8_t*)iov_base)[0x14] &= 0x8f;
702
        ((uint8_t*)iov_base)[0x14] &= 0x8f;
700
703
701
        iov_base = (void *) ((uint8_t*)iov_base + DVDCSS_BLOCK_SIZE);
704
        iov_base = (void *) ((uint8_t*)iov_base + DVDCSS_BLOCK_SIZE);
(-)pymedia-1.3.7.3/removable/cd/dvdlibs/dvdread/dvd_reader.c (-2 / +2 lines)
Lines 496-502 Link Here
496
		if( dvd_file != NULL ) {
496
		if( dvd_file != NULL ) {
497
			int bytes_read;
497
			int bytes_read;
498
			int file_size = dvd_file->filesize * DVD_VIDEO_LB_LEN;
498
			int file_size = dvd_file->filesize * DVD_VIDEO_LB_LEN;
499
			char *buffer = malloc( file_size );
499
			char *buffer = (char *) malloc( file_size );
500
			
500
			
501
			if( buffer == NULL ) {
501
			if( buffer == NULL ) {
502
				//fprintf( stderr, "libdvdread: DVDDiscId, failed to "
502
				//fprintf( stderr, "libdvdread: DVDDiscId, failed to "
Lines 539-545 Link Here
539
    return -1;
539
    return -1;
540
  }
540
  }
541
  
541
  
542
  buffer = malloc( DVD_VIDEO_LB_LEN );
542
  buffer = (unsigned char*) malloc( DVD_VIDEO_LB_LEN );
543
  if( buffer == NULL ) {
543
  if( buffer == NULL ) {
544
    fprintf( stderr, "libdvdread: DVDISOVolumeInfo, failed to "
544
    fprintf( stderr, "libdvdread: DVDISOVolumeInfo, failed to "
545
	     "allocate memory for file read!\n" );
545
	     "allocate memory for file read!\n" );
(-)pymedia-1.3.7.3/removable/cd/dvdlibs/dvdread/dvd_reader.h (+3 lines)
Lines 106-111 Link Here
106
				  single file. */
106
				  single file. */
107
} dvd_read_domain_t;
107
} dvd_read_domain_t;
108
108
109
void *GetUDFCacheHandle(dvd_reader_t *device);
110
void SetUDFCacheHandle(dvd_reader_t *device, void *cache);
111
109
/**
112
/**
110
 * Opens a file on the DVD given the title number and domain.
113
 * Opens a file on the DVD given the title number and domain.
111
 *
114
 *
(-)pymedia-1.3.7.3/removable/cd/dvdlibs/dvdread/dvd_udf.c (-4 / +4 lines)
Lines 209-215 Link Here
209
  c = (struct udf_cache *)GetUDFCacheHandle(device);
209
  c = (struct udf_cache *)GetUDFCacheHandle(device);
210
  
210
  
211
  if(c == NULL) {
211
  if(c == NULL) {
212
    c = calloc(1, sizeof(struct udf_cache));    
212
    c = (udf_cache*) calloc(1, sizeof(struct udf_cache));    
213
    //    fprintf(stderr, "calloc: %d\n", sizeof(struct udf_cache));    
213
    //    fprintf(stderr, "calloc: %d\n", sizeof(struct udf_cache));    
214
    if(c == NULL) {
214
    if(c == NULL) {
215
      return 0;
215
      return 0;
Lines 245-251 Link Here
245
      }
245
      }
246
    }
246
    }
247
    c->lb_num++;
247
    c->lb_num++;
248
    c->lbs = realloc(c->lbs, c->lb_num * sizeof(struct lbudf));
248
    c->lbs = (lbudf*) realloc(c->lbs, c->lb_num * sizeof(struct lbudf));
249
    /*
249
    /*
250
    fprintf(stderr, "realloc lb: %d * %d = %d\n",
250
    fprintf(stderr, "realloc lb: %d * %d = %d\n",
251
		c->lb_num, sizeof(struct lbudf),
251
		c->lb_num, sizeof(struct lbudf),
Lines 268-274 Link Here
268
      }
268
      }
269
    }
269
    }
270
    c->map_num++;
270
    c->map_num++;
271
    c->maps = realloc(c->maps, c->map_num * sizeof(struct icbmap));
271
    c->maps = (icbmap*) realloc(c->maps, c->map_num * sizeof(struct icbmap));
272
    /*
272
    /*
273
    fprintf(stderr, "realloc maps: %d * %d = %d\n",
273
    fprintf(stderr, "realloc maps: %d * %d = %d\n",
274
		c->map_num, sizeof(struct icbmap),
274
		c->map_num, sizeof(struct icbmap),
Lines 530-536 Link Here
530
		
530
		
531
		if(!GetUDFCache(device, LBUDFCache, lbnum, &cached_dir)) {
531
		if(!GetUDFCache(device, LBUDFCache, lbnum, &cached_dir)) {
532
			dir_lba = (Dir.Length + DVD_VIDEO_LB_LEN) / DVD_VIDEO_LB_LEN;
532
			dir_lba = (Dir.Length + DVD_VIDEO_LB_LEN) / DVD_VIDEO_LB_LEN;
533
			if((cached_dir = malloc(dir_lba * DVD_VIDEO_LB_LEN)) == NULL) {
533
			if((cached_dir = (uint8_t*) malloc(dir_lba * DVD_VIDEO_LB_LEN)) == NULL) {
534
				return 0;
534
				return 0;
535
			}
535
			}
536
			if( DVDReadLBUDF( device, lbnum, dir_lba, cached_dir, 0) <= 0 ) {
536
			if( DVDReadLBUDF( device, lbnum, dir_lba, cached_dir, 0) <= 0 ) {
(-)pymedia-1.3.7.3/removable/cd/dvdlibs/dvdread/ifo_read.c (-13 / +151 lines)
Lines 60-71 Link Here
60
    fprintf(stderr, "\n"); \
60
    fprintf(stderr, "\n"); \
61
  }
61
  }
62
62
63
static const uint8_t my_friendly_zeros[2048];
64
#else
63
#else
65
#define CHECK_ZERO0(arg) (void)(arg)
64
#define CHECK_ZERO0(arg) (void)(arg)
66
#define CHECK_ZERO(arg) (void)(arg)
65
#define CHECK_ZERO(arg) (void)(arg)
67
#endif
66
#endif
68
67
68
static const uint8_t my_friendly_zeros[2048] = {  
69
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  
70
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                    
71
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                    
72
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                    
73
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                    
74
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                    
75
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                    
76
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                    
77
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                    
78
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                    
79
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                    
80
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                    
81
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                    
82
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                    
83
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                    
84
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                    
85
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                    
86
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                    
87
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                    
88
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                    
89
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                    
90
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                    
91
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                    
92
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                    
93
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                    
94
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                    
95
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                    
96
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                    
97
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                    
98
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                    
99
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                    
100
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                    
101
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                    
102
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                    
103
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                    
104
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                    
105
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                    
106
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                    
107
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                                            
108
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                                            
109
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                                            
110
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                                            
111
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                                            
112
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                                            
113
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                                            
114
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                                            
115
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                                            
116
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                                            
117
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                                            
118
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                                            
119
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                                            
120
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                                            
121
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                                            
122
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                                            
123
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                                            
124
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                                            
125
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                                            
126
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                                            
127
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                                            
128
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                                            
129
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                                            
130
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                                            
131
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                                            
132
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                                            
133
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                                            
134
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                                            
135
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                                            
136
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                                            
137
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                                            
138
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                                            
139
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                                            
140
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                                            
141
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                                            
142
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                                            
143
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                                            
144
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                                            
145
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                                            
146
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                                            
147
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                                            
148
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                                            
149
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                                            
150
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                                            
151
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                                            
152
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                                            
153
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                                            
154
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                                            
155
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                                            
156
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                                            
157
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                                            
158
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                                            
159
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                                            
160
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                                            
161
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                                            
162
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                                            
163
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                                            
164
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,                                                                            
165
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
166
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
167
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
168
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
169
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
170
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
171
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
172
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
173
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
174
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
175
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
176
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
177
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
178
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
179
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
180
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
181
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
182
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
183
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
184
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
185
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
186
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
187
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
188
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
189
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
190
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
191
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
192
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
193
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
194
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
195
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
196
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
197
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
198
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
199
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
200
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
201
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
202
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
203
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
204
0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
205
0,  0,  0,  0,  0,  0,  0,  0 };
206
69
207
70
/* Prototypes for internal functions */
208
/* Prototypes for internal functions */
71
static int ifoRead_VMG(ifo_handle_t *ifofile);
209
static int ifoRead_VMG(ifo_handle_t *ifofile);
Lines 679-685 Link Here
679
  }
817
  }
680
  
818
  
681
  if(pgc->command_tbl_offset != 0) {
819
  if(pgc->command_tbl_offset != 0) {
682
    pgc->command_tbl = malloc(sizeof(pgc_command_tbl_t));
820
    pgc->command_tbl = (pgc_command_tbl_t*) malloc(sizeof(pgc_command_tbl_t));
683
    if(!pgc->command_tbl)
821
    if(!pgc->command_tbl)
684
      return 0;
822
      return 0;
685
823
Lines 693-699 Link Here
693
  }
831
  }
694
  
832
  
695
  if(pgc->program_map_offset != 0) {
833
  if(pgc->program_map_offset != 0) {
696
    pgc->program_map = malloc(pgc->nr_of_programs * sizeof(pgc_program_map_t));
834
    pgc->program_map = (pgc_program_map_t*) malloc(pgc->nr_of_programs * sizeof(pgc_program_map_t));
697
    if(!pgc->program_map) {
835
    if(!pgc->program_map) {
698
      ifoFree_PGC_COMMAND_TBL(pgc->command_tbl);
836
      ifoFree_PGC_COMMAND_TBL(pgc->command_tbl);
699
      return 0;
837
      return 0;
Lines 709-715 Link Here
709
  }
847
  }
710
  
848
  
711
  if(pgc->cell_playback_offset != 0) {
849
  if(pgc->cell_playback_offset != 0) {
712
    pgc->cell_playback = malloc(pgc->nr_of_cells * sizeof(cell_playback_t));
850
    pgc->cell_playback = (cell_playback_t*) malloc(pgc->nr_of_cells * sizeof(cell_playback_t));
713
    if(!pgc->cell_playback) {
851
    if(!pgc->cell_playback) {
714
      ifoFree_PGC_COMMAND_TBL(pgc->command_tbl);
852
      ifoFree_PGC_COMMAND_TBL(pgc->command_tbl);
715
      if(pgc->program_map)
853
      if(pgc->program_map)
Lines 730-736 Link Here
730
  }
868
  }
731
  
869
  
732
  if(pgc->cell_position_offset != 0) {
870
  if(pgc->cell_position_offset != 0) {
733
    pgc->cell_position = malloc(pgc->nr_of_cells * sizeof(cell_position_t));
871
    pgc->cell_position = (cell_position_t*) malloc(pgc->nr_of_cells * sizeof(cell_position_t));
734
    if(!pgc->cell_position) {
872
    if(!pgc->cell_position) {
735
      ifoFree_PGC(pgc);
873
      ifoFree_PGC(pgc);
736
      return 0;
874
      return 0;
Lines 963-969 Link Here
963
 
1101
 
964
  vts_ptt_srpt->ttu_offset = data;
1102
  vts_ptt_srpt->ttu_offset = data;
965
  
1103
  
966
  vts_ptt_srpt->title = malloc(vts_ptt_srpt->nr_of_srpts * sizeof(ttu_t));
1104
  vts_ptt_srpt->title = (ttu_t*) malloc(vts_ptt_srpt->nr_of_srpts * sizeof(ttu_t));
967
  if(!vts_ptt_srpt->title) {
1105
  if(!vts_ptt_srpt->title) {
968
    free(vts_ptt_srpt);
1106
    free(vts_ptt_srpt);
969
    free(data);
1107
    free(data);
Lines 983-989 Link Here
983
    CHECK_VALUE(n % 4 == 0);
1121
    CHECK_VALUE(n % 4 == 0);
984
    
1122
    
985
    vts_ptt_srpt->title[i].nr_of_ptts = n / 4;
1123
    vts_ptt_srpt->title[i].nr_of_ptts = n / 4;
986
    vts_ptt_srpt->title[i].ptt = malloc(n * sizeof(ptt_info_t));
1124
    vts_ptt_srpt->title[i].ptt = (ptt_info_t*) malloc(n * sizeof(ptt_info_t));
987
    if(!vts_ptt_srpt->title[i].ptt) {
1125
    if(!vts_ptt_srpt->title[i].ptt) {
988
      for(n = 0; n < i; n++)
1126
      for(n = 0; n < i; n++)
989
        free(vts_ptt_srpt->title[n].ptt);
1127
        free(vts_ptt_srpt->title[n].ptt);
Lines 1619-1625 Link Here
1619
  CHECK_VALUE(pgcit->nr_of_pgci_srp < 10000); // ?? seen max of 1338
1757
  CHECK_VALUE(pgcit->nr_of_pgci_srp < 10000); // ?? seen max of 1338
1620
  
1758
  
1621
  info_length = pgcit->nr_of_pgci_srp * PGCI_SRP_SIZE;
1759
  info_length = pgcit->nr_of_pgci_srp * PGCI_SRP_SIZE;
1622
  data = malloc(info_length);
1760
  data = (uint8_t*) malloc(info_length);
1623
  if(!data)
1761
  if(!data)
1624
    return 0;
1762
    return 0;
1625
1763
Lines 1628-1634 Link Here
1628
    return 0;
1766
    return 0;
1629
  }
1767
  }
1630
1768
1631
  pgcit->pgci_srp = malloc(pgcit->nr_of_pgci_srp * sizeof(pgci_srp_t));
1769
  pgcit->pgci_srp = (pgci_srp_t*) malloc(pgcit->nr_of_pgci_srp * sizeof(pgci_srp_t));
1632
  if(!pgcit->pgci_srp) {
1770
  if(!pgcit->pgci_srp) {
1633
    free(data);
1771
    free(data);
1634
    return 0;
1772
    return 0;
Lines 1647-1653 Link Here
1647
    CHECK_VALUE(pgcit->pgci_srp[i].pgc_start_byte + PGC_SIZE <= pgcit->last_byte+1);
1785
    CHECK_VALUE(pgcit->pgci_srp[i].pgc_start_byte + PGC_SIZE <= pgcit->last_byte+1);
1648
  
1786
  
1649
  for(i = 0; i < pgcit->nr_of_pgci_srp; i++) {
1787
  for(i = 0; i < pgcit->nr_of_pgci_srp; i++) {
1650
    pgcit->pgci_srp[i].pgc = malloc(sizeof(pgc_t));
1788
    pgcit->pgci_srp[i].pgc = (pgc_t*) malloc(sizeof(pgc_t));
1651
    if(!pgcit->pgci_srp[i].pgc) {
1789
    if(!pgcit->pgci_srp[i].pgc) {
1652
      int j;
1790
      int j;
1653
      for(j = 0; j < i; j++) {
1791
      for(j = 0; j < i; j++) {
Lines 1741-1747 Link Here
1741
  CHECK_VALUE((uint32_t)pgci_ut->nr_of_lus * PGCI_LU_SIZE < pgci_ut->last_byte);
1879
  CHECK_VALUE((uint32_t)pgci_ut->nr_of_lus * PGCI_LU_SIZE < pgci_ut->last_byte);
1742
1880
1743
  info_length = pgci_ut->nr_of_lus * PGCI_LU_SIZE;
1881
  info_length = pgci_ut->nr_of_lus * PGCI_LU_SIZE;
1744
  data = malloc(info_length);
1882
  data = (uint8_t*) malloc(info_length);
1745
  if(!data) {
1883
  if(!data) {
1746
    free(pgci_ut);
1884
    free(pgci_ut);
1747
    ifofile->pgci_ut = 0;
1885
    ifofile->pgci_ut = 0;
Lines 1754-1760 Link Here
1754
    return 0;
1892
    return 0;
1755
  }
1893
  }
1756
1894
1757
  pgci_ut->lu = malloc(pgci_ut->nr_of_lus * sizeof(pgci_lu_t));
1895
  pgci_ut->lu = (pgci_lu_t*) malloc(pgci_ut->nr_of_lus * sizeof(pgci_lu_t));
1758
  if(!pgci_ut->lu) {
1896
  if(!pgci_ut->lu) {
1759
    free(data);
1897
    free(data);
1760
    free(pgci_ut);
1898
    free(pgci_ut);
Lines 1784-1790 Link Here
1784
  }
1922
  }
1785
1923
1786
  for(i = 0; i < pgci_ut->nr_of_lus; i++) {
1924
  for(i = 0; i < pgci_ut->nr_of_lus; i++) {
1787
    pgci_ut->lu[i].pgcit = malloc(sizeof(pgcit_t));
1925
    pgci_ut->lu[i].pgcit = (pgcit_t*) malloc(sizeof(pgcit_t));
1788
    if(!pgci_ut->lu[i].pgcit) {
1926
    if(!pgci_ut->lu[i].pgcit) {
1789
      unsigned int j;
1927
      unsigned int j;
1790
      for(j = 0; j < i; j++) {
1928
      for(j = 0; j < i; j++) {
(-)pymedia-1.3.7.3/removable/cd/dvdlibs/dvdread/ifo_read.h (+2 lines)
Lines 27-32 Link Here
27
extern "C" {
27
extern "C" {
28
#endif
28
#endif
29
29
30
/* static const uint8_t my_friendly_zeros[2048]; */
31
30
/**
32
/**
31
 * handle = ifoOpen(dvd, title);
33
 * handle = ifoOpen(dvd, title);
32
 *
34
 *
(-)pymedia-1.3.7.3/removable/cd/dvdlibs/dvdread/md5.c (-30 / +8 lines)
Lines 52-60 Link Here
52
52
53
/* Initialize structure containing state of computation.
53
/* Initialize structure containing state of computation.
54
   (RFC 1321, 3.3: Step 3)  */
54
   (RFC 1321, 3.3: Step 3)  */
55
void
55
void md5_init_ctx (struct md5_ctx * ctx)
56
md5_init_ctx (ctx)
57
     struct md5_ctx *ctx;
58
{
56
{
59
  ctx->A = 0x67452301;
57
  ctx->A = 0x67452301;
60
  ctx->B = 0xefcdab89;
58
  ctx->B = 0xefcdab89;
Lines 70-79 Link Here
70
68
71
   IMPORTANT: On some systems it is required that RESBUF is correctly
69
   IMPORTANT: On some systems it is required that RESBUF is correctly
72
   aligned for a 32 bits value.  */
70
   aligned for a 32 bits value.  */
73
void *
71
void * md5_read_ctx ( const struct md5_ctx *ctx, void *resbuf )
74
md5_read_ctx (ctx, resbuf)
75
     const struct md5_ctx *ctx;
76
     void *resbuf;
77
{
72
{
78
  ((md5_uint32 *) resbuf)[0] = SWAP (ctx->A);
73
  ((md5_uint32 *) resbuf)[0] = SWAP (ctx->A);
79
  ((md5_uint32 *) resbuf)[1] = SWAP (ctx->B);
74
  ((md5_uint32 *) resbuf)[1] = SWAP (ctx->B);
Lines 89-97 Link Here
89
   IMPORTANT: On some systems it is required that RESBUF is correctly
84
   IMPORTANT: On some systems it is required that RESBUF is correctly
90
   aligned for a 32 bits value.  */
85
   aligned for a 32 bits value.  */
91
void *
86
void *
92
md5_finish_ctx (ctx, resbuf)
87
md5_finish_ctx (struct md5_ctx *ctx, void *resbuf)
93
     struct md5_ctx *ctx;
94
     void *resbuf;
95
{
88
{
96
  /* Take yet unprocessed bytes into account.  */
89
  /* Take yet unprocessed bytes into account.  */
97
  md5_uint32 bytes = ctx->buflen;
90
  md5_uint32 bytes = ctx->buflen;
Lines 119-128 Link Here
119
/* Compute MD5 message digest for bytes read from STREAM.  The
112
/* Compute MD5 message digest for bytes read from STREAM.  The
120
   resulting message digest number will be written into the 16 bytes
113
   resulting message digest number will be written into the 16 bytes
121
   beginning at RESBLOCK.  */
114
   beginning at RESBLOCK.  */
122
int
115
int md5_stream ( FILE *stream, void *resblock)
123
md5_stream (stream, resblock)
124
     FILE *stream;
125
     void *resblock;
126
{
116
{
127
  /* Important: BLOCKSIZE must be a multiple of 64.  */
117
  /* Important: BLOCKSIZE must be a multiple of 64.  */
128
#define BLOCKSIZE 4096
118
#define BLOCKSIZE 4096
Lines 176-186 Link Here
176
   result is always in little endian byte order, so that a byte-wise
166
   result is always in little endian byte order, so that a byte-wise
177
   output yields to the wanted ASCII representation of the message
167
   output yields to the wanted ASCII representation of the message
178
   digest.  */
168
   digest.  */
179
void *
169
void * md5_buffer ( const char *buffer, size_t len, void *resblock)
180
md5_buffer (buffer, len, resblock)
181
     const char *buffer;
182
     size_t len;
183
     void *resblock;
184
{
170
{
185
  struct md5_ctx ctx;
171
  struct md5_ctx ctx;
186
172
Lines 195-205 Link Here
195
}
181
}
196
182
197
183
198
void
184
void md5_process_bytes ( const void *buffer, size_t len, struct md5_ctx *ctx)
199
md5_process_bytes (buffer, len, ctx)
200
     const void *buffer;
201
     size_t len;
202
     struct md5_ctx *ctx;
203
{
185
{
204
  /* When we already have some bits in our internal buffer concatenate
186
  /* When we already have some bits in our internal buffer concatenate
205
     both inputs first.  */
187
     both inputs first.  */
Lines 253-266 Link Here
253
/* Process LEN bytes of BUFFER, accumulating context into CTX.
235
/* Process LEN bytes of BUFFER, accumulating context into CTX.
254
   It is assumed that LEN % 64 == 0.  */
236
   It is assumed that LEN % 64 == 0.  */
255
237
256
void
238
void md5_process_block ( const void *buffer, size_t len, struct md5_ctx *ctx)
257
md5_process_block (buffer, len, ctx)
258
     const void *buffer;
259
     size_t len;
260
     struct md5_ctx *ctx;
261
{
239
{
262
  md5_uint32 correct_words[16];
240
  md5_uint32 correct_words[16];
263
  const md5_uint32 *words = buffer;
241
  const md5_uint32 *words = (const md5_uint32*) buffer;
264
  size_t nwords = len / sizeof (md5_uint32);
242
  size_t nwords = len / sizeof (md5_uint32);
265
  const md5_uint32 *endp = words + nwords;
243
  const md5_uint32 *endp = words + nwords;
266
  md5_uint32 A = ctx->A;
244
  md5_uint32 A = ctx->A;

Return to bug 70480