Merge lp:~xnox/upstart/bug-1324096 into lp:~jamesodhunt/upstart/bug-1324096

Proposed by Dimitri John Ledkov
Status: Merged
Merged at revision: 1624
Proposed branch: lp:~xnox/upstart/bug-1324096
Merge into: lp:~jamesodhunt/upstart/bug-1324096
Diff against target: 27 lines (+10/-0)
1 file modified
init/control.c (+10/-0)
To merge this branch: bzr merge lp:~xnox/upstart/bug-1324096
Reviewer Review Type Date Requested Status
James Hunt Approve
Review via email: mp+222142@code.launchpad.net
To post a comment you must log in.
Revision history for this message
James Hunt (jamesodhunt) wrote :

Thanks - merged.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'init/control.c'
2--- init/control.c 2014-06-04 15:32:58 +0000
3+++ init/control.c 2014-06-05 09:25:56 +0000
4@@ -1393,6 +1393,11 @@
5 const char *var,
6 int replace)
7 {
8+ if (! var) {
9+ nih_dbus_error_raise_printf (DBUS_ERROR_INVALID_ARGS,
10+ _("Variable may not be empty string"));
11+ return -1;
12+ }
13 nih_local char **vars = NULL;
14
15 vars = NIH_MUST (nih_str_array_new (NULL));
16@@ -1523,6 +1528,11 @@
17 char * const *job_details,
18 const char *name)
19 {
20+ if (! name) {
21+ nih_dbus_error_raise_printf (DBUS_ERROR_INVALID_ARGS,
22+ _("Variable may not be empty string"));
23+ return -1;
24+ }
25 nih_local char **names = NULL;
26
27 names = NIH_MUST (nih_str_array_new (NULL));

Subscribers

People subscribed via source and target branches