While likely very uncommon, this sanitizes the input and does nothing in
the event of the length being equal to or less than zero, avoiding
constructing a std::string when there's no need to. It also avoids an
out-of-memory scenario, as a negative value would wrap around to its
equivalent unsigned representation in std::string's constructor.
e.g. If someone was silly and a length of -1 was specified, this would
make a string with a length of 0xFFFFFFFFFFFFFFFF on a 64-bit platform,
which will obviously eventually fail due to the allocation being way too
large.
Despite being covered by a global mutex, we should still ensure that the
class handles its reference counts properly. This avoids potential
shenanigans when it comes to data races.
Given this is the root object that drives quite a bit of the kernel
object hierarchy, ensuring we always have the correct behavior (and no
races) is a good thing.
Shared fonts is no different from any other system archives, and there is not really any point to make a separate status for it. This also fixes the incorrect error message that was introduced when I made the UI text improvements.
* Add setting to switch between a fixed start time and the system time
Add clock settings to SDL
Make clock configureable in qt
Add a SharedPage handler class
Init shared_page_handler for tests
* kernel/event: Make data members private
Instead we can simply provide accessors to the required data instead of
giving external read/write access to the variables directly.
* fix compile error
* client_port: Make all data members private
These members don't need to be entirely exposed, we can instead expose
an API to operate on them without directly needing to mutate them
We can also guard against overflow/API misuse this way as well, given
active_sessions is an unsigned value.
* make the condition an assert
Using member variables for referencing the segments array increases the
size of the class in memory for little benefit. The same behavior can be
achieved through the use of accessors that just return the relevant
segment.
General moving to keep kernel object types separate from the direct
kernel code. Also essentially a preliminary cleanup before eliminating
global kernel state in the kernel code.
* NWM_UDS: use sizeof(<var being used>) instead of hard-coded type
Intend to fix#4090.
` node_map.node.second` type was changed to `u16` in #3985. However the type change wasn't reflected here. Should have used variable name instead to automatically do type change
* NWM_UDS: ... and also the node.first one
* NWM_UDS: ... and here
* Network: bump version because we changed UDS packet layout
* Update nwm_uds.cpp
Avoids using a u32 to compare against a range of size_t, which can be a
source of warnings. While we're at it, compress a std::tie into a
structured binding.
* Service::HTTP_C: Add decryption of the ClCertA
* fixup! Service::HTTP_C: Add decryption of the ClCertA
* fixup! Service::HTTP_C: Add decryption of the ClCertA
* FileSys:: Add MakeNCCHArchivePath and MakeNCCHFilePath; Small fixes in HTTP_C::DecryptDefaultClientCert
* fixup! fixup! Service::HTTP_C: Add decryption of the ClCertA
* fixup! fixup! fixup! Service::HTTP_C: Add decryption of the ClCertA