* [gentoo-commits] proj/sandbox:stable-2.x commit in: src/
@ 2023-08-06 0:40 Mike Gilbert
0 siblings, 0 replies; 2+ messages in thread
From: Mike Gilbert @ 2023-08-06 0:40 UTC (permalink / raw
To: gentoo-commits
commit: 3ad50e42b3a55bfa2713f0bbdc496b7c78fd8038
Author: gto2023 <gto7052 <AT> mailbox <DOT> org>
AuthorDate: Thu Jul 13 11:55:09 2023 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sun Aug 6 00:39:52 2023 +0000
URL: https://gitweb.gentoo.org/proj/sandbox.git/commit/?id=3ad50e42
sandbox: prevent possible use of uninitialized members of sandbox_info struct
Signed-off-by: gto2023 <gto7052 <AT> mailbox.org>
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
(cherry picked from commit 5d13985d6ec4ceeced9b9b45f00bc19c69efbb8f)
src/sandbox.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/sandbox.c b/src/sandbox.c
index f4ffd20..9c3e0da 100644
--- a/src/sandbox.c
+++ b/src/sandbox.c
@@ -211,7 +211,7 @@ int main(int argc, char **argv)
{
int sandbox_log_presence = 0;
- struct sandbox_info_t sandbox_info;
+ struct sandbox_info_t sandbox_info = {};
char **sandbox_environ;
char **argv_bash = NULL;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] proj/sandbox:stable-2.x commit in: src/
@ 2023-08-06 0:40 Mike Gilbert
0 siblings, 0 replies; 2+ messages in thread
From: Mike Gilbert @ 2023-08-06 0:40 UTC (permalink / raw
To: gentoo-commits
commit: b0b2afb1941f540126aa510d47636cd8d2cf9ad8
Author: gto2023 <gto7052 <AT> mailbox <DOT> org>
AuthorDate: Thu Jul 13 11:59:24 2023 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sun Aug 6 00:39:52 2023 +0000
URL: https://gitweb.gentoo.org/proj/sandbox.git/commit/?id=b0b2afb1
sandbox: do not compare array to NULL
Fixes a compiler warning:
```
src/environ.c:211:19: warning: the comparison will always evaluate as ‘true’ for the address of ‘work_dir’ will never be NULL [-Waddress]
```
Bug: https://bugs.gentoo.org/906234
Signed-off-by: gto2023 <gto7052 <AT> mailbox.org>
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
(cherry picked from commit 7f230519475c2aaea91df75b0165d8b6c03b9fa9)
src/environ.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/environ.c b/src/environ.c
index 542dd64..2b28c0b 100644
--- a/src/environ.c
+++ b/src/environ.c
@@ -208,7 +208,7 @@ static int setup_cfg_vars(struct sandbox_info_t *sandbox_info)
if (-1 == setup_access_var(ENV_SANDBOX_WRITE))
return -1;
if ((NULL == getenv(ENV_SANDBOX_WRITE)) &&
- (NULL != sandbox_info->work_dir))
+ strlen(sandbox_info->work_dir))
setenv(ENV_SANDBOX_WRITE, sandbox_info->work_dir, 1);
if (-1 == setup_access_var(ENV_SANDBOX_PREDICT))
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-08-06 0:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-06 0:40 [gentoo-commits] proj/sandbox:stable-2.x commit in: src/ Mike Gilbert
-- strict thread matches above, loose matches on Subject: below --
2023-08-06 0:40 Mike Gilbert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox