Skip to content

Commit

Permalink
fix: memory corruption in libuuu fastboot
Browse files Browse the repository at this point in the history
Signed-off-by: Tomas Jaros <[email protected]>
  • Loading branch information
tjaros committed Feb 27, 2025
1 parent 3ec1b00 commit a506bfd
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions libuuu/fastboot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ int FastBoot::Transport(string cmd, void *p, size_t size, vector<uint8_t> *input
memset(buff, 0, 65);
if (m_pTrans->read(buff, 64, &actual))
return -1;

buff[actual] = '\0';

if (strncmp(buff, "DATA",4) == 0)
{
Expand Down
4 changes: 2 additions & 2 deletions wrapper/CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
{
"name": "windows",
"generator": "Visual Studio 17 2022",
"generator": "Visual Studio 16 2019",
"inherits": [ "default" ],
"cacheVariables": {
"VCPKG_TARGET_TRIPLET": "x64-windows-sd"
Expand All @@ -24,4 +24,4 @@
"inherits": [ "default" ]
}
]
}
}
1 change: 1 addition & 0 deletions wrapper/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ target-version = ["py39", "py310", "py311"]
include = '\.pyi?$'

[tool.isort]
skip = ["__version__.py"]
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
Expand Down
2 changes: 1 addition & 1 deletion wrapper/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
setuptools-scm>=8
setuptools-scm<8.2

0 comments on commit a506bfd

Please sign in to comment.