OpenTTD Source 20260218-master-g2123fca5ea
safeguards.h File Reference

A number of safeguards to prevent using unsafe methods. More...

Go to the source code of this file.

Detailed Description

A number of safeguards to prevent using unsafe methods.

Unsafe methods are, for example, strndup and strncpy because they may leave the string without a null termination, but also strdup and strndup because they can return nullptr and then all strdups would need to be guarded against.

Definition in file safeguards.h.