[libdvdnav-devel] [Git][videolan/libdvdread][master] 3 commits: sprintf -> strcpy

Petri Hintukainen gitlab at videolan.org
Mon Apr 19 06:18:27 UTC 2021



Petri Hintukainen pushed to branch master at VideoLAN / libdvdread


Commits:
47a582c6 by Petri Hintukainen at 2021-04-19T09:14:13+03:00
sprintf -> strcpy

- - - - -
65ad37d3 by Petri Hintukainen at 2021-04-19T09:14:13+03:00
Remove unused struct field

- - - - -
0c281afa by Petri Hintukainen at 2021-04-19T09:14:13+03:00
Fix packaging files in msvc

- - - - -


3 changed files:

- Makefile.am
- src/dvd_reader.c
- src/dvd_udf.c


Changes:

=====================================
Makefile.am
=====================================
@@ -12,7 +12,7 @@ ChangeLog: $(wildcard $(srcdir)/.git/logs/HEAD)
 	-rm -f $(@)-tmp
 	test -e $(@) || touch $(@)
 
-EXTRA_DIST = msvc/ doc/footer.html doc/header.html
+EXTRA_DIST = msvc doc/footer.html doc/header.html
 
 lib_LTLIBRARIES = libdvdread.la
 


=====================================
src/dvd_reader.c
=====================================
@@ -286,7 +286,7 @@ static int initAllCSSKeys( dvd_reader_t *ctx )
   for( title = 0; title < 100; title++ ) {
     gettimeofday( &t_s, NULL );
     if( title == 0 ) {
-      sprintf( filename, "/VIDEO_TS/VIDEO_TS.VOB" );
+      strcpy( filename, "/VIDEO_TS/VIDEO_TS.VOB" );
     } else {
       sprintf( filename, "/VIDEO_TS/VTS_%02d_%d.VOB", title, 0 );
     }


=====================================
src/dvd_udf.c
=====================================
@@ -75,7 +75,6 @@ static int DVDReadLBUDF( dvd_reader_t *ctx, uint32_t lb_number,
 
 struct Partition {
   int valid;
-  char VolumeDesc[128];
   uint16_t Flags;
   uint16_t Number;
   char Contents[32];
@@ -414,10 +413,9 @@ static int UDFPartition( uint8_t *data, uint16_t *Flags, uint16_t *Number,
  * Reads the volume descriptor and checks the parameters.  Returns 0 on OK, 1
  * on error.
  */
-static int UDFLogVolume( uint8_t *data, char *VolumeDescriptor )
+static int UDFLogVolume( uint8_t *data )
 {
   uint32_t lbsize;
-  Unicodedecode(&data[84], 128, VolumeDescriptor);
   lbsize = GETN4(212);  /* should be 2048 */
   /* MT_L = GETN4(264);  */  /* should be 6 */
   /* N_PM = GETN4(268);  */  /* should be 1 */
@@ -774,7 +772,6 @@ static int UDFFindPartition( dvd_reader_t *ctx, int partnum,
 
   part->valid = 0;
   volvalid = 0;
-  part->VolumeDesc[ 0 ] = '\0';
   i = 1;
   do {
     /* Find Volume Descriptor */
@@ -799,7 +796,7 @@ static int UDFFindPartition( dvd_reader_t *ctx, int partnum,
         part->valid = ( partnum == part->Number );
       } else if( ( TagID == LogicalVolumeDescriptor ) && ( !volvalid ) ) {
         /* Logical Volume Descriptor */
-        if( UDFLogVolume( LogBlock, part->VolumeDesc ) ) {
+        if( UDFLogVolume( LogBlock ) ) {
           /* TODO: sector size wrong! */
         } else
           volvalid = 1;



View it on GitLab: https://code.videolan.org/videolan/libdvdread/-/compare/37e2354e016648f7c74ad48fcb5524919bb228de...0c281afada0ee5f2f4842eabafb4cb1c5d0e0ced

-- 
View it on GitLab: https://code.videolan.org/videolan/libdvdread/-/compare/37e2354e016648f7c74ad48fcb5524919bb228de...0c281afada0ee5f2f4842eabafb4cb1c5d0e0ced
You're receiving this email because of your account on code.videolan.org.




More information about the libdvdnav-devel mailing list