We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6930ef5 + 0bf8ecf commit bb48f5dCopy full SHA for bb48f5d
sapi/cli/ps_title.c
@@ -169,19 +169,18 @@ char** save_ps_args(int argc, char** argv)
169
end_of_area = argv[i] + strlen(argv[i]);
170
}
171
172
+ if (!is_contiguous_area) {
173
+ goto clobber_error;
174
+ }
175
+
176
/*
177
* check for contiguous environ strings following argv
178
*/
- for (i = 0; is_contiguous_area && (environ[i] != NULL); i++)
179
+ for (i = 0; environ[i] != NULL; i++)
180
{
- if (end_of_area + 1 != environ[i]) {
- is_contiguous_area = false;
181
+ if (end_of_area + 1 == environ[i]) {
182
+ end_of_area = environ[i] + strlen(environ[i]);
183
- end_of_area = environ[i] + strlen(environ[i]);
- }
-
- if (!is_contiguous_area) {
184
- goto clobber_error;
185
186
187
ps_buffer = argv[0];
0 commit comments