mirror of
https://git.tesses.org/tesses50/crosslang.git
synced 2026-08-02 00:25:32 +00:00
Fix a security vulerability in crossdump that is supposed to use uint32_t but accidently used uint8_t, set to tessesframework=0.0.5
This commit is contained in:
@@ -94,7 +94,7 @@ void CrossLangDump(std::shared_ptr<Tesses::Framework::Streams::Stream> strm) {
|
||||
|
||||
uint32_t ents = EnsureInt(strm);
|
||||
|
||||
for (uint8_t k = 0; k < ents; k++) {
|
||||
for (uint32_t k = 0; k < ents; k++) {
|
||||
Ensure(strm, main_header, 1);
|
||||
uint8_t flags = main_header[0];
|
||||
std::cout << "\t\t/^" << strs.at(EnsureInt(strm)) << "^/"
|
||||
|
||||
@@ -3,7 +3,17 @@
|
||||
#include <iostream>
|
||||
|
||||
namespace Tesses::CrossLang {
|
||||
|
||||
TObject Console_setInvertedColors(GCList &ls, std::vector<TObject> args) {
|
||||
bool inverted;
|
||||
if (GetArgument(args, 0, inverted)) {
|
||||
Tesses::Framework::Console::SetInvertedColors(inverted);
|
||||
}
|
||||
return Undefined();
|
||||
}
|
||||
TObject Console_Reset(GCList &ls, std::vector<TObject> args) {
|
||||
Tesses::Framework::Console::Reset();
|
||||
return Undefined();
|
||||
}
|
||||
TObject Console_getIsTTY(GCList &ls, std::vector<TObject> args) {
|
||||
|
||||
return Tesses::Framework::Console::IsTTY();
|
||||
|
||||
@@ -280,6 +280,16 @@ void TStd::RegisterProcess(std::shared_ptr<GC> gc, TRootEnvironment *env) {
|
||||
}
|
||||
return Undefined();
|
||||
});
|
||||
|
||||
process->DeclareFunction(
|
||||
gc, "ShellFileOrUrl", "Launch file or url in shell", {"urlOrFilename"},
|
||||
[](GCList &ls, std::vector<TObject> args) -> TObject {
|
||||
std::string fileOrUrl;
|
||||
if (GetArgument(args, 0, fileOrUrl))
|
||||
Tesses::Framework::Platform::ShellFileOrUrl(fileOrUrl);
|
||||
|
||||
return Undefined();
|
||||
});
|
||||
gc->BarrierEnd();
|
||||
}
|
||||
} // namespace Tesses::CrossLang
|
||||
|
||||
Reference in New Issue
Block a user