[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Libcdio-devel] [PATCH 1/3] Fix name conflicts of SafeDosDevIOCtl() with
From: |
KO Myung-Hun |
Subject: |
[Libcdio-devel] [PATCH 1/3] Fix name conflicts of SafeDosDevIOCtl() with kLIBC v0.6.6 |
Date: |
Mon, 12 Dec 2016 17:17:21 +0900 |
kLIBC v0.6.6 introduced SafeDosDevIOCtl() to make DosDevIOCtl()
high-memory safe. SafeDosDevIOCtl() in libcdio calls DosDevIOCtl(),
which is intened to be a macro to SafeDosDevIOCtl() of kLIBC v0.6.6,
in it.
As a result, SafeDosDevIOCtl() calls itself recursively. This leads
to a stack overflow and all calls to DosDevIOCtl() fails.
---
lib/driver/os2.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/lib/driver/os2.c b/lib/driver/os2.c
index 23df59c..c6907ad 100644
--- a/lib/driver/os2.c
+++ b/lib/driver/os2.c
@@ -93,9 +93,9 @@ run_mmc_cmd_os2( void *p_user_data, unsigned int i_timeout_ms,
High memory safe wrapper for DosDevIOCtl()
*/
static APIRET
-SafeDosDevIOCtl( HFILE hdevice, ULONG category, ULONG function,
- PVOID pParams, ULONG cbParamLenMax, PULONG pcbParamLen,
- PVOID pData, ULONG cbDataLenMax, PULONG pcbDataLen )
+libcdio_DosDevIOCtl( HFILE hdevice, ULONG category, ULONG function,
+ PVOID pParams, ULONG cbParamLenMax, PULONG pcbParamLen,
+ PVOID pData, ULONG cbDataLenMax, PULONG pcbDataLen )
{
PVOID pParamsLow = NULL;
PVOID pDataLow = NULL;
@@ -162,7 +162,8 @@ exit_free:
return rc;
}
-#define DosDevIOCtl SafeDosDevIOCtl
+#undef DosDevIOCtl
+#define DosDevIOCtl libcdio_DosDevIOCtl
/*!
Set the volume of an audio CD.
--
2.9.2
- [Libcdio-devel] [PATCH 1/3] Fix name conflicts of SafeDosDevIOCtl() with kLIBC v0.6.6,
KO Myung-Hun <=