Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • videolan/libdvdread
  • thresh/libdvdread
  • ePirat/libdvdread
  • jsgh/libdvdread
  • chouquette/libdvdread
  • jbk/libdvdread
  • sebastinas/libdvdread
  • hpi/libdvdread
  • Mathias_Couder/libdvdread
  • robUx4/libdvdread
  • miguelborgesdefreitas/libdvdread
  • basilgello/libdvdread
  • vpeter4/libdvdread
13 results
Show changes
Commits on Source (4)
......@@ -17,6 +17,7 @@ void *dlopen(const char *module_name, int mode)
UINT em;
HINSTANCE dsoh;
char path[MAX_PATH], *p;
(void)mode;
/* Load the module...
* per PR2555, the LoadLibraryEx function is very picky about slashes.
* Debugging on NT 4 SP 6a reveals First Chance Exception within NTDLL.
......@@ -26,8 +27,9 @@ void *dlopen(const char *module_name, int mode)
* Transpose '\' for '/' in the filename.
*/
(void)strncpy(path, module_name, MAX_PATH);
path[MAX_PATH - 1] = 0;
p = path;
while (p = strchr(p, '/'))
while ((p = strchr(p, '/')))
*p = '\\';
/* First assume the dso/dll's required by -this- dso are sitting in the
......
......@@ -49,8 +49,6 @@ static inline int _private_gettimeofday( struct timeval *tv, void *tz )
}
# define gettimeofday(TV, TZ) _private_gettimeofday((TV), (TZ))
# endif
# include <io.h> /* read() */
# define lseek64 _lseeki64
#endif
#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__bsdi__) || defined(__APPLE__)
......@@ -336,7 +334,7 @@ static dvd_reader_t *DVDOpenCommon( void *priv,
dvd_reader_stream_cb *stream_cb )
{
struct stat fileinfo;
int ret, have_css, retval, cdir = -1;
int ret, have_css, cdir = -1;
char *dev_name = NULL;
char *path = NULL, *new_path = NULL, *path_copy = NULL;
dvd_reader_t *ctx = calloc(1, sizeof(*ctx));
......@@ -450,6 +448,7 @@ static dvd_reader_t *DVDOpenCommon( void *priv,
/* Resolve any symlinks and get the absolute dir name. */
{
if( ( cdir = open( ".", O_RDONLY ) ) >= 0 ) {
int retval;
if( chdir( path_copy ) == -1 ) {
goto DVDOpen_error;
}
......