mirror of
				https://github.com/pbatard/rufus.git
				synced 2024-08-14 23:57:05 +00:00 
			
		
		
		
	[iso] update libcdio to latest
* Also update .gitignore for VS2017 files
This commit is contained in:
		
							parent
							
								
									8a491e9877
								
							
						
					
					
						commit
						97b4e623cd
					
				
					 23 changed files with 372 additions and 280 deletions
				
			
		
							
								
								
									
										5
									
								
								.gitignore
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								.gitignore
									
										
									
									
										vendored
									
									
								
							|  | @ -1,9 +1,13 @@ | |||
| *.a | ||||
| *.aps | ||||
| *.db | ||||
| *.db-shm | ||||
| *.db-wal | ||||
| *.dep | ||||
| *.exe | ||||
| *.htm | ||||
| *.idb | ||||
| *.ipch | ||||
| *.la | ||||
| *.lib | ||||
| *.lo | ||||
|  | @ -12,6 +16,7 @@ | |||
| *.ncb | ||||
| *.o | ||||
| *.obj | ||||
| *.opendb | ||||
| *.opt | ||||
| *.pc | ||||
| *.pdb | ||||
|  |  | |||
|  | @ -1,6 +1,6 @@ | |||
| /*
 | ||||
|     Copyright (C) 2000, 2004 Herbert Valerio Riedel <hvr@gnu.org> | ||||
|     Copyright (C) 2005, 2008, 2012 Rocky Bernstein <rocky@gnu.org> | ||||
|     Copyright (C) 2005, 2008, 2012, 2015 Rocky Bernstein <rocky@gnu.org> | ||||
| 
 | ||||
|     This program is free software: you can redistribute it and/or modify | ||||
|     it under the terms of the GNU General Public License as published by | ||||
|  | @ -206,6 +206,18 @@ from_733 (uint64_t p) | |||
|   return (UINT32_C(0xFFFFFFFF) & p); | ||||
| } | ||||
| 
 | ||||
| static CDIO_INLINE uint32_t | ||||
| from_733_with_err (uint64_t p, bool *err) | ||||
| { | ||||
|   if (uint64_swap_le_be (p) != p) { | ||||
|     cdio_warn ("from_733: broken byte order"); | ||||
|     *err = true; | ||||
|   } else { | ||||
|     *err = false; | ||||
|   } | ||||
|   return (UINT32_C(0xFFFFFFFF) & p); | ||||
| } | ||||
| 
 | ||||
| #endif /* CDIO_BYTESEX_H_ */ | ||||
| 
 | ||||
|  | ||||
|  |  | |||
|  | @ -126,7 +126,7 @@ typedef uint8_t ubyte; | |||
| 
 | ||||
|   /* some GCC optimizations -- gcc 2.5+ */ | ||||
| 
 | ||||
| #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4) || __clang__ | ||||
| #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4) | ||||
| #define GNUC_PRINTF( format_idx, arg_idx )              \ | ||||
|   __attribute__((format (printf, format_idx, arg_idx))) | ||||
| #define GNUC_SCANF( format_idx, arg_idx )               \ | ||||
|  | @ -155,8 +155,9 @@ typedef uint8_t ubyte; | |||
| #  define PRAGMA_BEGIN_PACKED _Pragma("pack(push)") \ | ||||
|                               _Pragma("pack(1)") | ||||
| #  define PRAGMA_END_PACKED   _Pragma("pack(pop)") | ||||
| #elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901) | ||||
|      /* should work with most EDG-frontend based compilers */ | ||||
| #elif __GNUC__ > 4  || (__STDC_VERSION__ >= 199901) | ||||
|      /* should work with GCC > 4.0 clang and most EDG-frontend based C
 | ||||
|         and C++ compilers */ | ||||
| #    define PRAGMA_BEGIN_PACKED _Pragma("pack(1)") | ||||
| #    define PRAGMA_END_PACKED   _Pragma("pack()") | ||||
| #elif defined(_MSC_VER) | ||||
|  |  | |||
|  | @ -1,20 +1,19 @@ | |||
| /* $Id: version.h.in,v 1.6 2005/01/29 20:54:20 rocky Exp $ */ | ||||
| /** \file version.h
 | ||||
|  * | ||||
|  *  \brief A file containing the libcdio package version | ||||
|  *  number (90) and OS build name.  | ||||
|  *  number (94) and OS build name. | ||||
|  */ | ||||
| 
 | ||||
| /*! CDIO_VERSION is a C-Preprocessor macro of a string that shows what
 | ||||
|     version is used.  cdio_version_string has the same value, but it is a | ||||
|     constant variable that can be accessed at run time. */ | ||||
| #define CDIO_VERSION "0.93 i686-pc-mingw32" | ||||
| #define CDIO_VERSION "0.94 i686-w64-mingw32" | ||||
| extern const char *cdio_version_string; /**< = CDIO_VERSION */ | ||||
| 
 | ||||
| /*! LIBCDIO_VERSION_NUM is a C-Preprocessor macro that can be used for
 | ||||
|     testing in the C preprocessor. libcdio_version_num has the same | ||||
|     value, but it is a constant variable that can be accessed at run | ||||
|     time.  */ | ||||
| #define LIBCDIO_VERSION_NUM 93 | ||||
| #define LIBCDIO_VERSION_NUM 94 | ||||
| 
 | ||||
| extern const unsigned int libcdio_version_num; /**< = LIBCDIO_VERSION_NUM */ | ||||
|  |  | |||
|  | @ -134,7 +134,9 @@ | |||
| #define HAVE_STRING_H 1 | ||||
| 
 | ||||
| /* Define to 1 if you have the `strndup' function. */ | ||||
| /* #undef HAVE_STRNDUP */ | ||||
| #if defined(__MINGW32__) | ||||
| #define HAVE_STRNDUP 1 | ||||
| #endif | ||||
| 
 | ||||
| /* Define this if you have struct timespec */ | ||||
| /* #undef HAVE_STRUCT_TIMESPEC */ | ||||
|  |  | |||
|  | @ -36,7 +36,6 @@ | |||
|     <ClInclude Include="..\..\cdio\ds.h" /> | ||||
|     <ClInclude Include="..\..\cdio\logging.h" /> | ||||
|     <ClInclude Include="..\..\cdio\memory.h" /> | ||||
|     <ClInclude Include="..\..\cdio\portable.h" /> | ||||
|     <ClInclude Include="..\..\cdio\sector.h" /> | ||||
|     <ClInclude Include="..\..\cdio\types.h" /> | ||||
|     <ClInclude Include="..\..\cdio\util.h" /> | ||||
|  | @ -45,6 +44,7 @@ | |||
|     <ClInclude Include="..\cdio_assert.h" /> | ||||
|     <ClInclude Include="..\cdio_private.h" /> | ||||
|     <ClInclude Include="..\filemode.h" /> | ||||
|     <ClInclude Include="..\portable.h" /> | ||||
|     <ClInclude Include="..\_cdio_stdio.h" /> | ||||
|     <ClInclude Include="..\_cdio_stream.h" /> | ||||
|   </ItemGroup> | ||||
|  |  | |||
|  | @ -88,7 +88,7 @@ | |||
|     <ClInclude Include="..\..\cdio\memory.h"> | ||||
|       <Filter>Header Files</Filter> | ||||
|     </ClInclude> | ||||
|     <ClInclude Include="..\..\cdio\portable.h"> | ||||
|     <ClInclude Include="..\portable.h"> | ||||
|       <Filter>Header Files</Filter> | ||||
|     </ClInclude> | ||||
|   </ItemGroup> | ||||
|  |  | |||
|  | @ -36,7 +36,6 @@ | |||
|     <ClInclude Include="..\..\cdio\ds.h" /> | ||||
|     <ClInclude Include="..\..\cdio\logging.h" /> | ||||
|     <ClInclude Include="..\..\cdio\memory.h" /> | ||||
|     <ClInclude Include="..\..\cdio\portable.h" /> | ||||
|     <ClInclude Include="..\..\cdio\sector.h" /> | ||||
|     <ClInclude Include="..\..\cdio\types.h" /> | ||||
|     <ClInclude Include="..\..\cdio\util.h" /> | ||||
|  | @ -45,6 +44,7 @@ | |||
|     <ClInclude Include="..\cdio_assert.h" /> | ||||
|     <ClInclude Include="..\cdio_private.h" /> | ||||
|     <ClInclude Include="..\filemode.h" /> | ||||
|     <ClInclude Include="..\portable.h" /> | ||||
|     <ClInclude Include="..\_cdio_stdio.h" /> | ||||
|     <ClInclude Include="..\_cdio_stream.h" /> | ||||
|   </ItemGroup> | ||||
|  |  | |||
|  | @ -88,7 +88,7 @@ | |||
|     <ClInclude Include="..\..\cdio\memory.h"> | ||||
|       <Filter>Header Files</Filter> | ||||
|     </ClInclude> | ||||
|     <ClInclude Include="..\..\cdio\portable.h"> | ||||
|     <ClInclude Include="..\portable.h"> | ||||
|       <Filter>Header Files</Filter> | ||||
|     </ClInclude> | ||||
|   </ItemGroup> | ||||
|  |  | |||
|  | @ -88,8 +88,6 @@ static inline int _stati64_utf8(const char *path, struct _stati64 *buffer) { | |||
| #define _STRINGIFY(a) #a | ||||
| #define STRINGIFY(a) _STRINGIFY(a) | ||||
| 
 | ||||
| // static const char _rcsid[] = "$Id: _cdio_stdio.c,v 1.6 2008/04/22 15:29:11 karl Exp $";
 | ||||
| 
 | ||||
| #define CDIO_STDIO_BUFSIZE (128*1024) | ||||
| 
 | ||||
| typedef struct { | ||||
|  | @ -283,8 +281,7 @@ cdio_stdio_new(const char pathname[]) | |||
|   return new_obj; | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|  | ||||
| /*
 | ||||
|  * Local variables: | ||||
|  *  c-file-style: "gnu" | ||||
|  |  | |||
|  | @ -1,5 +1,5 @@ | |||
| /*
 | ||||
|   Copyright (C) 2005, 2006, 2008, 2011 Rocky Bernstein <rocky@gnu.org> | ||||
|   Copyright (C) 2005, 2006, 2008, 2011, 2016 Rocky Bernstein <rocky@gnu.org> | ||||
|   Copyright (C) 2000, 2004, 2005 Herbert Valerio Riedel <hvr@gnu.org> | ||||
| 
 | ||||
|   This program is free software: you can redistribute it and/or modify | ||||
|  | @ -41,8 +41,6 @@ | |||
| #include <cdio/util.h> | ||||
| #include "_cdio_stream.h" | ||||
| 
 | ||||
| // static const char _rcsid[] = "$Id: _cdio_stream.c,v 1.9 2008/04/22 15:29:11 karl Exp $";
 | ||||
| 
 | ||||
| /*
 | ||||
|  * DataSource implementations | ||||
|  */ | ||||
|  | @ -212,8 +210,7 @@ cdio_stream_stat(CdioDataSource_t *p_obj) | |||
|   return p_obj->op.stat(p_obj->user_data); | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|  | ||||
| /*
 | ||||
|  * Local variables: | ||||
|  *  c-file-style: "gnu" | ||||
|  |  | |||
|  | @ -1,5 +1,5 @@ | |||
| /*
 | ||||
|   Copyright (C) 2003, 2004, 2005, 2008, 2009, 2011, 2012 | ||||
|   Copyright (C) 2003-2005, 2008-2009, 2011-2012, 2016 | ||||
|   Rocky Bernstein <rocky@gnu.org> | ||||
| 
 | ||||
|   This program is free software: you can redistribute it and/or modify | ||||
|  | @ -26,15 +26,37 @@ | |||
| # include "config.h" | ||||
| #endif | ||||
| 
 | ||||
| #ifdef HAVE_STDLIB_H | ||||
| #include <stdlib.h> | ||||
| #endif | ||||
| #ifdef HAVE_STRING_H | ||||
| #include <string.h> | ||||
| #endif | ||||
| 
 | ||||
| #include <cdio/cdio.h> | ||||
| #include <cdio/audio.h> | ||||
| #include <cdio/cdtext.h> | ||||
| //#include "mmc/mmc_private.h"
 | ||||
| #include "mmc/mmc_private.h" | ||||
| 
 | ||||
| #ifdef __cplusplus | ||||
| extern "C" { | ||||
| #endif /* __cplusplus */ | ||||
| 
 | ||||
| #ifndef HAVE_STRNDUP | ||||
| static inline char *strndup(const char *s, size_t n) | ||||
| { | ||||
|     char *result; | ||||
|     size_t len = strlen (s); | ||||
|     if (n < len) | ||||
|         len = n; | ||||
|     result = (char *) malloc (len + 1); | ||||
|     if (!result) | ||||
|         return 0; | ||||
|     result[len] = '\0'; | ||||
|     return (char *) strncpy (result, s, len); | ||||
| } | ||||
| #endif /*HAVE_STRNDUP*/ | ||||
| 
 | ||||
|   /*!
 | ||||
|     Get directory name from file name. | ||||
| 
 | ||||
|  | @ -420,7 +442,7 @@ extern "C" { | |||
| 
 | ||||
|       Returns 0 if command completed successfully. | ||||
|     */ | ||||
| //    mmc_run_cmd_fn_t run_mmc_cmd;
 | ||||
|     mmc_run_cmd_fn_t run_mmc_cmd; | ||||
| 
 | ||||
|     /*!
 | ||||
|       Set the arg "key" with "value" in the source device. | ||||
|  |  | |||
|  | @ -1,5 +1,5 @@ | |||
| /*
 | ||||
|   Copyright (C) 2005, 2008, 2011 Rocky Bernstein <rocky@gnu.org> | ||||
|   Copyright (C) 2005, 2008, 2011, 2016 Rocky Bernstein <rocky@gnu.org> | ||||
|   Copyright (C) 2000 Herbert Valerio Riedel <hvr@gnu.org> | ||||
| 
 | ||||
|   This program is free software: you can redistribute it and/or modify | ||||
|  | @ -33,8 +33,6 @@ | |||
| #include <cdio/types.h> | ||||
| #include "cdio_assert.h" | ||||
| 
 | ||||
| // static const char _rcsid[] = "$Id: ds.c,v 1.4 2008/04/22 15:29:12 karl Exp $";
 | ||||
| 
 | ||||
| struct _CdioList | ||||
| { | ||||
|   unsigned length; | ||||
|  | @ -243,8 +241,7 @@ _cdio_list_node_data (CdioListNode_t *p_node) | |||
| 
 | ||||
| /* eof */ | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|  | ||||
| /*
 | ||||
|  * Local variables: | ||||
|  *  c-file-style: "gnu" | ||||
|  | @ -252,4 +249,3 @@ _cdio_list_node_data (CdioListNode_t *p_node) | |||
|  *  indent-tabs-mode: nil | ||||
|  * End: | ||||
|  */ | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,5 +1,5 @@ | |||
| /*
 | ||||
|   Copyright (C) 2003, 2004, 2008, 2011, 2012 | ||||
|   Copyright (C) 2003, 2004, 2008, 2011, 2012, 2015 | ||||
|   Rocky Bernstein <rocky@gnu.org> | ||||
|   Copyright (C) 2000 Herbert Valerio Riedel <hvr@gnu.org> | ||||
| 
 | ||||
|  | @ -33,8 +33,9 @@ | |||
| #endif | ||||
| 
 | ||||
| #include <cdio/logging.h> | ||||
| #include <cdio/portable.h> | ||||
| #include "cdio_assert.h" | ||||
| #include "portable.h" | ||||
| #include <assert.h> | ||||
| 
 | ||||
| cdio_log_level_t cdio_loglevel_default = CDIO_LOG_WARN; | ||||
| 
 | ||||
|  | @ -96,10 +97,24 @@ static void | |||
| cdio_logv(cdio_log_level_t level, const char format[], va_list args) | ||||
| { | ||||
|   char buf[1024] = { 0, }; | ||||
| 
 | ||||
|   /* _handler() is user defined and we want to make sure _handler()
 | ||||
|   doesn't call us, cdio_logv. in_recursion is used for that, however | ||||
|   it has a problem in multi-threaded programs. I'm not sure how to | ||||
|   handle multi-threading and recursion checking both. For now, we'll | ||||
|   leave in the recursion checking, at the expense of handling | ||||
|   multi-threaded log calls. To ameliorate this, we'll check the log | ||||
|   level and handle calls where there is no output, before the | ||||
|   recursion check. | ||||
|   */ | ||||
|  static int in_recursion = 0; | ||||
| 
 | ||||
|   if (in_recursion) | ||||
|     cdio_assert_not_reached (); | ||||
|   if (level < cdio_loglevel_default) return; | ||||
| 
 | ||||
|   if (in_recursion) { | ||||
|     /* Can't use cdio_assert_not_reached() as that may call cdio_logv */ | ||||
|     assert(0); | ||||
|   } | ||||
| 
 | ||||
|   in_recursion = 1; | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,5 +1,5 @@ | |||
| /*
 | ||||
|   Copyright (C) 2014 Robert Kausch <robert.kausch@freac.org> | ||||
|   Copyright (C) 2014-2015 Robert Kausch <robert.kausch@freac.org> | ||||
| 
 | ||||
|   This program is free software: you can redistribute it and/or modify | ||||
|   it under the terms of the GNU General Public License as published by | ||||
|  | @ -36,7 +36,6 @@ | |||
| void | ||||
| cdio_free (void *p_memory) | ||||
| { | ||||
|   if (p_memory == NULL) return; | ||||
| 
 | ||||
|   if (p_memory != NULL) | ||||
|     free(p_memory); | ||||
| } | ||||
|  |  | |||
|  | @ -1,5 +1,6 @@ | |||
| /*
 | ||||
|   Copyright (C) 2004, 2005, 2011, 2012, 2014 Rocky Bernstein <rocky@gnu.org> | ||||
|   Copyright (C) 2004, 2005, 2011, 2012, 2014, 2016 | ||||
|   Rocky Bernstein <rocky@gnu.org> | ||||
|   Copyright (C) 2000 Herbert Valerio Riedel <hvr@gnu.org> | ||||
| 
 | ||||
|   This program is free software: you can redistribute it and/or modify | ||||
|  | @ -24,8 +25,8 @@ | |||
| #include <cdio/sector.h> | ||||
| #include <cdio/util.h> | ||||
| #include <cdio/logging.h> | ||||
| #include <cdio/portable.h> | ||||
| #include "cdio_assert.h" | ||||
| #include "portable.h" | ||||
| 
 | ||||
| #ifdef HAVE_STDIO_H | ||||
| #include <stdio.h> | ||||
|  | @ -36,8 +37,6 @@ | |||
| 
 | ||||
| #include <ctype.h> | ||||
| 
 | ||||
| // static const char _rcsid[] = "$Id: sector.c,v 1.5 2005/02/06 04:20:25 rocky Exp $";
 | ||||
| 
 | ||||
| /*! String of bytes used to identify the beginning of a Mode 1 or
 | ||||
|   Mode 2 sector. */ | ||||
| const uint8_t CDIO_SECTOR_SYNC_HEADER[CDIO_CD_SYNC_SIZE] = | ||||
|  |  | |||
|  | @ -1,5 +1,5 @@ | |||
| /*
 | ||||
|   Copyright (C) 2003-2009, 2013-2014 Rocky Bernstein <rocky@gnu.org> | ||||
|   Copyright (C) 2003-2009, 2013-2014, 2016 Rocky Bernstein <rocky@gnu.org> | ||||
|   Copyright (C) 2000 Herbert Valerio Riedel <hvr@gnu.org> | ||||
| 
 | ||||
|   This program is free software: you can redistribute it and/or modify | ||||
|  | @ -31,7 +31,6 @@ const char ISO_STANDARD_ID[] = {'C', 'D', '0', '0', '1'}; | |||
| #include <cdio/bytesex.h> | ||||
| #include <cdio/iso9660.h> | ||||
| #include <cdio/util.h> | ||||
| #include <cdio/portable.h> | ||||
| 
 | ||||
| #include <time.h> | ||||
| #include <ctype.h> | ||||
|  | @ -92,7 +91,7 @@ timegm(struct tm *tm) | |||
| #endif | ||||
| 
 | ||||
| #ifndef HAVE_GMTIME_R | ||||
| struct tm * | ||||
| static struct tm * | ||||
| gmtime_r(const time_t *timer, struct tm *result) | ||||
| { | ||||
|     struct tm *tmp = gmtime(timer); | ||||
|  | @ -106,7 +105,7 @@ gmtime_r(const time_t *timer, struct tm *result) | |||
| #endif | ||||
| 
 | ||||
| #ifndef HAVE_LOCALTIME_R | ||||
| struct tm * | ||||
| static struct tm * | ||||
| localtime_r(const time_t *timer, struct tm *result) | ||||
| { | ||||
|     struct tm *tmp = localtime(timer); | ||||
|  | @ -119,8 +118,6 @@ localtime_r(const time_t *timer, struct tm *result) | |||
| } | ||||
| #endif | ||||
| 
 | ||||
| // static const char _rcsid[] = "$Id: iso9660.c,v 1.41 2008/06/25 08:01:54 rocky Exp $";
 | ||||
| 
 | ||||
| /* Variables to hold debugger-helping enumerations */ | ||||
| enum iso_enum1_s     iso_enums1; | ||||
| enum iso_flag_enum_s iso_flag_enums; | ||||
|  |  | |||
|  | @ -1,5 +1,5 @@ | |||
| /*
 | ||||
|   Copyright (C) 2003-2008, 2011-2014 Rocky Bernstein <rocky@gnu.org> | ||||
|   Copyright (C) 2003-2008, 2011-2015 Rocky Bernstein <rocky@gnu.org> | ||||
|   Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org> | ||||
| 
 | ||||
|   This program is free software: you can redistribute it and/or modify | ||||
|  | @ -16,7 +16,7 @@ | |||
|   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | ||||
| */ | ||||
| /* iso9660 filesystem-based routines */ | ||||
| 
 | ||||
|  | ||||
| #if defined(HAVE_CONFIG_H) && !defined(__CDIO_CONFIG_H__) | ||||
| #include "config.h" | ||||
| #define __CDIO_CONFIG_H__ 1 | ||||
|  | @ -47,7 +47,6 @@ | |||
| #include <cdio/iso9660.h> | ||||
| #include <cdio/util.h> | ||||
| #include <cdio/utf8.h> | ||||
| #include <cdio/portable.h> | ||||
| 
 | ||||
| /* Private headers */ | ||||
| #include "cdio_assert.h" | ||||
|  | @ -264,6 +263,7 @@ static bool | |||
| check_pvd (const iso9660_pvd_t *p_pvd, cdio_log_level_t log_level) | ||||
| { | ||||
|   if ( ISO_VD_PRIMARY != from_711(p_pvd->type) ) { | ||||
| // Commented out for Rufus usage
 | ||||
| //    cdio_log (log_level, "unexpected PVD type %d", p_pvd->type);
 | ||||
|     return false; | ||||
|   } | ||||
|  | @ -443,6 +443,7 @@ iso9660_ifs_read_pvd_loglevel (const iso9660_t *p_iso, | |||
| 			       cdio_log_level_t log_level) | ||||
| { | ||||
|   if (0 == iso9660_iso_seek_read (p_iso, p_pvd, ISO_PVD_SECTOR, 1)) { | ||||
| // Commented out for Rufus usage
 | ||||
| //    cdio_log ( log_level, "error reading PVD sector (%d)", ISO_PVD_SECTOR );
 | ||||
|     return false; | ||||
|   } | ||||
|  | @ -715,6 +716,7 @@ _iso9660_dir_to_statbuf (iso9660_dir_t *p_iso9660_dir, bool_3way_t b_xa, | |||
|   iso711_t i_fname; | ||||
|   unsigned int stat_len; | ||||
|   iso9660_stat_t *p_stat; | ||||
|   bool err; | ||||
| 
 | ||||
|   if (!dir_len) return NULL; | ||||
| 
 | ||||
|  | @ -731,8 +733,16 @@ _iso9660_dir_to_statbuf (iso9660_dir_t *p_iso9660_dir, bool_3way_t b_xa, | |||
|     } | ||||
|   p_stat->type    = (p_iso9660_dir->file_flags & ISO_DIRECTORY) | ||||
|     ? _STAT_DIR : _STAT_FILE; | ||||
|   p_stat->lsn     = from_733 (p_iso9660_dir->extent); | ||||
|   p_stat->size    = from_733 (p_iso9660_dir->size); | ||||
|   p_stat->lsn     = from_733_with_err (p_iso9660_dir->extent, &err); | ||||
|   if (err) { | ||||
|     free(p_stat); | ||||
|     return NULL; | ||||
|   } | ||||
|   p_stat->size    = from_733_with_err (p_iso9660_dir->size, &err); | ||||
|   if (err) { | ||||
|     free(p_stat); | ||||
|     return NULL; | ||||
|   } | ||||
|   p_stat->secsize = _cdio_len2blocks (p_stat->size, ISO_BLOCKSIZE); | ||||
|   p_stat->rr.b3_rock = dunno; /*FIXME should do based on mask */ | ||||
|   p_stat->b_xa    = false; | ||||
|  | @ -1087,6 +1097,12 @@ _fs_iso_stat_traverse (iso9660_t *p_iso, const iso9660_stat_t *_root, | |||
|       p_stat = _iso9660_dir_to_statbuf (p_iso9660_dir, p_iso->b_xa, | ||||
| 					p_iso->u_joliet_level); | ||||
| 
 | ||||
|       if (!p_stat) { | ||||
| 	cdio_warn("Bad directory information for %s", splitpath[0]); | ||||
| 	free(_dirbuf); | ||||
| 	return NULL; | ||||
|       } | ||||
| 
 | ||||
|       cmp = strcmp(splitpath[0], p_stat->filename); | ||||
| 
 | ||||
|       if ( 0 != cmp && 0 == p_iso->u_joliet_level | ||||
|  | @ -1334,24 +1350,38 @@ iso9660_ifs_readdir (iso9660_t *p_iso, const char psz_path[]) | |||
|     unsigned offset = 0; | ||||
|     uint8_t *_dirbuf = NULL; | ||||
|     CdioList_t *retval = _cdio_list_new (); | ||||
|     const size_t dirbuf_len = p_stat->secsize * ISO_BLOCKSIZE; | ||||
| 
 | ||||
|     _dirbuf = calloc(1, p_stat->secsize * ISO_BLOCKSIZE); | ||||
| 
 | ||||
|     if (!dirbuf_len) | ||||
|       { | ||||
|         cdio_warn("Invalid directory buffer sector size %u", p_stat->secsize); | ||||
| 	free(p_stat->rr.psz_symlink); | ||||
| 	free(p_stat); | ||||
| 	_cdio_list_free (retval, true); | ||||
|         return NULL; | ||||
|       } | ||||
| 
 | ||||
|     _dirbuf = calloc(1, dirbuf_len); | ||||
|     if (!_dirbuf) | ||||
|       { | ||||
|         cdio_warn("Couldn't calloc(1, %d)", p_stat->secsize * ISO_BLOCKSIZE); | ||||
|         cdio_warn("Couldn't calloc(1, %lu)", (unsigned long)dirbuf_len); | ||||
| 	free(p_stat->rr.psz_symlink); | ||||
| 	free(p_stat); | ||||
| 	_cdio_list_free (retval, true); | ||||
|         return NULL; | ||||
|       } | ||||
| 
 | ||||
|     ret = iso9660_iso_seek_read (p_iso, _dirbuf, p_stat->lsn, p_stat->secsize); | ||||
|     if (ret != ISO_BLOCKSIZE*p_stat->secsize) | ||||
| 	  { | ||||
|     if (ret != dirbuf_len) 	  { | ||||
|       _cdio_list_free (retval, true); | ||||
|       free(p_stat->rr.psz_symlink); | ||||
|       free(p_stat); | ||||
|       free (_dirbuf); | ||||
|       return NULL; | ||||
|     } | ||||
| 
 | ||||
|     while (offset < (p_stat->secsize * ISO_BLOCKSIZE)) | ||||
|     while (offset < (dirbuf_len)) | ||||
|       { | ||||
| 	iso9660_dir_t *p_iso9660_dir = (void *) &_dirbuf[offset]; | ||||
| 	iso9660_stat_t *p_iso9660_stat; | ||||
|  | @ -1372,15 +1402,14 @@ iso9660_ifs_readdir (iso9660_t *p_iso, const char psz_path[]) | |||
|       } | ||||
| 
 | ||||
|     free (_dirbuf); | ||||
| 
 | ||||
|     if (offset != (p_stat->secsize * ISO_BLOCKSIZE)) { | ||||
|     free(p_stat->rr.psz_symlink); | ||||
|     free (p_stat); | ||||
| 
 | ||||
|     if (offset != dirbuf_len) { | ||||
|       _cdio_list_free (retval, true); | ||||
|       return NULL; | ||||
|     } | ||||
| 
 | ||||
|     free (p_stat->rr.psz_symlink); | ||||
|     free (p_stat); | ||||
|     return retval; | ||||
|   } | ||||
| } | ||||
|  |  | |||
|  | @ -168,8 +168,27 @@ get_rock_ridge_filename(iso9660_dir_t * p_iso9660_dir, | |||
| 
 | ||||
|     while (len > 1){ /* There may be one byte for padding somewhere */ | ||||
|       rr = (iso_extension_record_t *) chr; | ||||
|       if (rr->len == 0) goto out; /* Something got screwed up here */ | ||||
|       sig = *chr+(*(chr+1) << 8); | ||||
|       switch(sig){ | ||||
|       case SIG('S','P'): | ||||
|       case SIG('C','E'): | ||||
|       case SIG('E','R'): | ||||
|       case SIG('R','R'): | ||||
|       case SIG('P','X'): | ||||
|       case SIG('P','N'): | ||||
|       case SIG('S','L'): | ||||
|       case SIG('N','M'): | ||||
|       case SIG('C','L'): | ||||
|       case SIG('P','L'): | ||||
|       case SIG('T','F'): | ||||
|       case SIG('Z','F'): | ||||
| 	break; | ||||
|       default: | ||||
| 	 /* Something got screwed up here */ | ||||
| 	goto out; | ||||
|       } | ||||
| 
 | ||||
|       if (rr->len == 0) goto out; /* Something got screwed up here */ | ||||
|       chr += rr->len; | ||||
|       len -= rr->len; | ||||
| 
 | ||||
|  |  | |||
							
								
								
									
										3
									
								
								src/libcdio/mmc/mmc_private.h
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								src/libcdio/mmc/mmc_private.h
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,3 @@ | |||
| /* placeholder for unused MMC helper routines. */ | ||||
| 
 | ||||
| typedef driver_return_code_t (*mmc_run_cmd_fn_t) ( void ); | ||||
|  | @ -167,7 +167,7 @@ udf_get_lba(const udf_file_entry_t *p_udf_fe, | |||
|     { | ||||
|       /* The allocation descriptor field is filled with short_ad's. */ | ||||
|       udf_short_ad_t *p_ad = (udf_short_ad_t *) | ||||
| 	(p_udf_fe->u.ext_attr + p_udf_fe->i_extended_attr); | ||||
| 	(p_udf_fe->u.ext_attr + uint32_from_le(p_udf_fe->i_extended_attr)); | ||||
| 
 | ||||
|       *start = uint32_from_le(p_ad->pos); | ||||
|       *end = *start + | ||||
|  | @ -179,7 +179,7 @@ udf_get_lba(const udf_file_entry_t *p_udf_fe, | |||
|     { | ||||
|       /* The allocation descriptor field is filled with long_ad's */ | ||||
|       udf_long_ad_t *p_ad = (udf_long_ad_t *) | ||||
| 	(p_udf_fe->u.ext_attr + p_udf_fe->i_extended_attr); | ||||
| 	(p_udf_fe->u.ext_attr + uint32_from_le(p_udf_fe->i_extended_attr)); | ||||
| 
 | ||||
|       *start = uint32_from_le(p_ad->loc.lba); /* ignore partition number */ | ||||
|       *end = *start + | ||||
|  | @ -190,7 +190,7 @@ udf_get_lba(const udf_file_entry_t *p_udf_fe, | |||
|   case ICBTAG_FLAG_AD_EXTENDED: | ||||
|     { | ||||
|       udf_ext_ad_t *p_ad = (udf_ext_ad_t *) | ||||
| 	(p_udf_fe->u.ext_attr + p_udf_fe->i_extended_attr); | ||||
| 	(p_udf_fe->u.ext_attr + uint32_from_le(p_udf_fe->i_extended_attr)); | ||||
| 
 | ||||
|       *start = uint32_from_le(p_ad->ext_loc.lba); /* ignore partition number */ | ||||
|       *end = *start + | ||||
|  | @ -739,7 +739,7 @@ udf_readdir(udf_dirent_t *p_udf_dirent) | |||
| 	const unsigned int i_len = p_udf_dirent->fid->i_file_id; | ||||
| 
 | ||||
| 	if (DRIVER_OP_SUCCESS != udf_read_sectors(p_udf, &p_udf_dirent->fe, p_udf->i_part_start | ||||
| 			 + p_udf_dirent->fid->icb.loc.lba, 1)) { | ||||
| 			 + uint32_from_le(p_udf_dirent->fid->icb.loc.lba), 1)) { | ||||
| 		udf_dirent_free(p_udf_dirent); | ||||
| 		return NULL; | ||||
| 	} | ||||
|  |  | |||
							
								
								
									
										10
									
								
								src/rufus.rc
									
										
									
									
									
								
							
							
						
						
									
										10
									
								
								src/rufus.rc
									
										
									
									
									
								
							|  | @ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL | |||
| IDD_DIALOG DIALOGEX 12, 12, 242, 376 | ||||
| STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU | ||||
| EXSTYLE WS_EX_ACCEPTFILES | ||||
| CAPTION "Rufus 2.13.1069" | ||||
| CAPTION "Rufus 2.13.1070" | ||||
| FONT 8, "Segoe UI Symbol", 400, 0, 0x0 | ||||
| BEGIN | ||||
|     LTEXT           "Device",IDS_DEVICE_TXT,9,6,200,8 | ||||
|  | @ -334,8 +334,8 @@ END | |||
| // | ||||
| 
 | ||||
| VS_VERSION_INFO VERSIONINFO | ||||
|  FILEVERSION 2,13,1069,0 | ||||
|  PRODUCTVERSION 2,13,1069,0 | ||||
|  FILEVERSION 2,13,1070,0 | ||||
|  PRODUCTVERSION 2,13,1070,0 | ||||
|  FILEFLAGSMASK 0x3fL | ||||
| #ifdef _DEBUG | ||||
|  FILEFLAGS 0x1L | ||||
|  | @ -352,13 +352,13 @@ BEGIN | |||
|         BEGIN | ||||
|             VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" | ||||
|             VALUE "FileDescription", "Rufus" | ||||
|             VALUE "FileVersion", "2.13.1069" | ||||
|             VALUE "FileVersion", "2.13.1070" | ||||
|             VALUE "InternalName", "Rufus" | ||||
|             VALUE "LegalCopyright", "© 2011-2017 Pete Batard (GPL v3)" | ||||
|             VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" | ||||
|             VALUE "OriginalFilename", "rufus.exe" | ||||
|             VALUE "ProductName", "Rufus" | ||||
|             VALUE "ProductVersion", "2.13.1069" | ||||
|             VALUE "ProductVersion", "2.13.1070" | ||||
|         END | ||||
|     END | ||||
|     BLOCK "VarFileInfo" | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue