Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Joshua Root
libaacs
Commits
287e8309
Commit
287e8309
authored
Dec 17, 2011
by
npzacs
Committed by
Ano Nymous
Feb 18, 2012
Browse files
Fixed segfault when mount point path can't be resolved
parent
ca77cc7f
Changes
3
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
287e8309
????-??-??:
- Fixed segfault when mount point path can't be resolved
- Do not export internal symbols from generated parser/lexer
- Do not distribute generated parser files
- Check for libgpg-error. Link against it when needed.
...
...
configure.ac
View file @
287e8309
...
...
@@ -91,7 +91,7 @@ AC_TYPE_SIGNAL
# required headers
AC_CHECK_HEADERS([stdarg.h sys/types.h dirent.h errno.h libgen.h malloc.h])
AC_CHECK_HEADERS([stdlib.h mntent.h linux/cdrom.h inttypes.h])
AC_CHECK_HEADERS([sys/time.h time.h sys/select.h])
AC_CHECK_HEADERS([sys/time.h time.h sys/select.h
limits.h
])
# required structures
AC_STRUCT_DIRENT_D_TYPE
...
...
src/libaacs/mmc.c
View file @
287e8309
...
...
@@ -37,6 +37,10 @@
#include <mntent.h>
#endif
#ifdef HAVE_LIMITS_H
#include <limits.h>
#endif
#ifdef HAVE_LINUX_CDROM_H
#include <sys/ioctl.h>
#include <linux/cdrom.h>
...
...
@@ -384,7 +388,13 @@ MMC *mmc_open(const char *path)
#if defined(HAVE_MNTENT_H)
#ifdef HAVE_REALPATH
char
*
file_path
=
realpath
(
path
,
NULL
);
char
*
file_path
=
malloc
(
PATH_MAX
);
if
(
!
file_path
||
!
realpath
(
path
,
file_path
))
{
DEBUG
(
DBG_MMC
,
"Failed resolving path %s (%p)
\n
"
,
path
,
mmc
);
X_FREE
(
mmc
);
X_FREE
(
file_path
);
return
NULL
;
}
#else
char
*
file_path
=
(
char
*
)
malloc
(
strlen
(
path
)
+
1
);
strcpy
(
file_path
,
path
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment