mirror of
https://github.com/scp-fs2open/fs2open.github.com.git
synced 2026-11-07 08:15:59 -10:00
0c0320bb87d380047053cdbf6c4e47bec24a3f3e
get_ship(), get_wing(), get_object() and get_parse_object() only assigned their out-pointer on success. When a lookup failed (no bytes left, or a net signature that no longer resolves, e.g. a ship destroyed before the packet was processed) the caller's uninitialized local was left as stack garbage, so its nullptr check could pass and the next line would write through it. multi_sexp_set_camera_target() used the object without checking at all. Set the out-pointer to nullptr up front, so every caller's existing nullptr check works. This also clears the C4701/C4703 "potentially uninitialized" warnings MSVC 2026 reports for the callers in sexp.cpp when it inlines these getters at link time.
FreeSpace2 Source Code Project
Building
Before you do anything, make sure you have updated your git submodules, either by running git submodule update --init --recursive or by cloning the repository with the --recursive flag.
The main instructions for building can be found at our github wiki, on the Building page.
Releases
1
Release release_26_2_0
Latest
Languages
C++
75.7%
C
22%
CMake
1%
HTML
0.5%
Objective-C++
0.3%
Other
0.2%