dbus: limit the number of env variables to something reasonable, vol. 2

Turns out we can utilize this limit at a couple more places, so let's
move the previously defined limit constant to env-util.h and use it to
guard a couple more D-Bus methods. Also, bump it a bit, given it's meant
to be a safety cap that can't be hit in valid scenarios.

Follow-up for 7671b43cb8.
This commit is contained in:
Frantisek Sumsal
2026-05-01 20:11:53 +02:00
parent eb357bfff8
commit 49c1e1bcf2
4 changed files with 16 additions and 2 deletions
+2
View File
@@ -3,6 +3,8 @@
#include "basic-forward.h"
#define ENVIRONMENT_ASSIGNMENTS_MAX 16384U
size_t sc_arg_max(void);
bool env_name_is_valid(const char *e);