Skip to content

Commit 91578b0

Browse files
committed
Avoid array overflow.
1 parent d07bf57 commit 91578b0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/include/ruri.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,13 @@ struct __attribute__((aligned(128))) CONTAINER {
105105
// Capabilities to drop.
106106
cap_value_t drop_caplist[CAP_LAST_CAP + 1];
107107
// Command for exec(2).
108-
char *_Nullable command[MAX_COMMANDS];
108+
char *_Nullable command[MAX_COMMANDS + 1];
109109
// Extra mountpoints.
110-
char *_Nullable extra_mountpoint[MAX_MOUNTPOINTS];
110+
char *_Nullable extra_mountpoint[MAX_MOUNTPOINTS + 2];
111111
// Extra read-only mountpoints.
112-
char *_Nullable extra_ro_mountpoint[MAX_MOUNTPOINTS];
112+
char *_Nullable extra_ro_mountpoint[MAX_MOUNTPOINTS + 2];
113113
// Environment variables.
114-
char *_Nullable env[MAX_ENVS];
114+
char *_Nullable env[MAX_ENVS + 2];
115115
// Set NO_NEW_PRIV bit.
116116
bool no_new_privs;
117117
// Enable built-in seccomp profile.

0 commit comments

Comments
 (0)