Skip to content

Commit e8ef5f9

Browse files
committed
Nx fix potential oob bug when casting vfs
1 parent a8ac234 commit e8ef5f9

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

CMakeLists.txt

+7-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13)
22

33
set(FTPSRV_VERSION_MAJOR 1)
44
set(FTPSRV_VERSION_MINOR 2)
5-
set(FTPSRV_VERSION_PATCH 0)
5+
set(FTPSRV_VERSION_PATCH 1)
66
set(FTPSRV_VERSION ${FTPSRV_VERSION_MAJOR}.${FTPSRV_VERSION_MINOR}.${FTPSRV_VERSION_PATCH})
77

88
project(ftpsrv
@@ -209,6 +209,10 @@ if (FTPSRV_LIB_BUILD)
209209
target_compile_definitions(ftpsrv PUBLIC FTP_VFS_HEADER="${FTPSRV_LIB_VFS_CUSTOM}")
210210
endif()
211211

212+
if (FTPSRV_LIB_CUSTOM_DEFINES)
213+
target_compile_definitions(ftpsrv PUBLIC ${FTPSRV_LIB_CUSTOM_DEFINES})
214+
endif()
215+
212216
ftp_set_options(ftpsrv
213217
${FTPSRV_LIB_PATH_SIZE}
214218
${FTPSRV_LIB_SESSIONS}
@@ -266,7 +270,7 @@ else()
266270
${NX_SRC}
267271
)
268272

269-
target_compile_definitions(ftpexe PUBLIC
273+
target_compile_definitions(ftpsrv PUBLIC
270274
USE_VFS_SAVE=$<BOOL:${USE_VFS_SAVE}>
271275
USE_VFS_STORAGE=$<BOOL:${USE_VFS_STORAGE}>
272276
USE_VFS_GC=$<BOOL:${USE_VFS_GC}>
@@ -371,7 +375,7 @@ else()
371375
ftp_add(sysftp)
372376
target_link_libraries(sysftp PRIVATE ftpsrv_sysmod minIni)
373377

374-
target_compile_definitions(ftpexe PUBLIC
378+
target_compile_definitions(ftpsrv_sysmod PUBLIC
375379
USE_VFS_SAVE=$<BOOL:${USE_VFS_SAVE}>
376380
USE_VFS_STORAGE=$<BOOL:${USE_VFS_STORAGE}>
377381
USE_VFS_GC=$<BOOL:${USE_VFS_GC}>

0 commit comments

Comments
 (0)