Ticket #124 (closed defect: fixed)

Opened 22 months ago

Last modified 22 months ago

OpenRC 0.3.0 segfault in rc-misc.c

Reported by: anonymous Owned by: roy
Priority: major Milestone:
Component: rc Version: 0.2
Keywords: Cc:

Description

diff --git a/src/rc/rc-misc.c b/src/rc/rc-misc.c
--- a/src/rc/rc-misc.c
+++ b/src/rc/rc-misc.c
@@ -159,11 +159,13 @@

}

/* Now add anything missing from the profile */

  • TAILQ_FOREACH(env, profile, entries) {
  • e = strchr(env->value, '=');
  • *e = '\0';
  • if (!getenv(env->value))
  • setenv(env->value, e + 1, 1);

+ if (profile) {
+ TAILQ_FOREACH(env, profile, entries) {
+ e = strchr(env->value, '=');
+ *e = '\0';
+ if (!getenv(env->value))
+ setenv(env->value, e + 1, 1);
+ }

}

Change History

comment:1 Changed 22 months ago by roy

  • Status changed from new to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.