fix a potential segfault inside SGDeviceModel::ParseFirmware
This commit is contained in:
@@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
This is a bugfix release.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix a wrong type-casting inside SGDeviceModel::ParseFirmware where OutMainVersion and OutSubVersion arguments are getting passed to the lower levels of the API. This could potentially result in a segfault at the FFI boundary between lower and higher levels of the API.
|
||||
|
||||
## [1.9.4] - 2024-02-08
|
||||
|
||||
This is a bugfix release addressing mostly Blueprint API issues with ABI breaking changes inside the Blueprint layer, backported from the next major release of the plugin as documented below.
|
||||
|
||||
@@ -106,7 +106,6 @@
|
||||
#include "SGInterop/SGIC_FSGTimedThumpCommandImpl.h"
|
||||
#include "SGInterop/SGIC_FString.h"
|
||||
#include "SGInterop/SGIC_FVector.h"
|
||||
#include "SGInterop/SGIC_int32_Ref.h"
|
||||
|
||||
#if PLATFORM_ANDROID
|
||||
#include "SGInterop/SGIC_jclass.h"
|
||||
@@ -1243,13 +1242,13 @@ void SGCoreImpl_FSGDeviceModelImpl_ParseFunctions(
|
||||
|
||||
void SGCoreImpl_FSGDeviceModelImpl_ParseFirmware(
|
||||
void* RawFirmware,
|
||||
void* OutMainVersion,
|
||||
void* OutSubVersion)
|
||||
int32* OutMainVersion,
|
||||
int32* OutSubVersion)
|
||||
{
|
||||
FSGDeviceModelImpl::ParseFirmware(
|
||||
StaticCast<FSGIC_FString*>(RawFirmware)->String,
|
||||
StaticCast<FSGIC_int32_Ref*>(OutMainVersion)->Ref,
|
||||
StaticCast<FSGIC_int32_Ref*>(OutSubVersion)->Ref);
|
||||
*OutMainVersion,
|
||||
*OutSubVersion);
|
||||
}
|
||||
|
||||
void SGCoreImpl_FSGDeviceModelImpl_ctor(
|
||||
|
||||
@@ -630,8 +630,8 @@ SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGDeviceModelImpl_ParseFunctions(
|
||||
|
||||
SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGDeviceModelImpl_ParseFirmware(
|
||||
void* RawFirmware,
|
||||
void* OutMainVersion,
|
||||
void* OutSubVersion);
|
||||
int32* OutMainVersion,
|
||||
int32* OutSubVersion);
|
||||
|
||||
SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGDeviceModelImpl_ctor(
|
||||
void* OutDeviceModelImpl);
|
||||
|
||||
Reference in New Issue
Block a user