aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libbb/getopt_ulflags.c14
-rw-r--r--networking/httpd.c2
2 files changed, 14 insertions, 2 deletions
diff --git a/libbb/getopt_ulflags.c b/libbb/getopt_ulflags.c
index 9bf8c0559..04d1e669f 100644
--- a/libbb/getopt_ulflags.c
+++ b/libbb/getopt_ulflags.c
@@ -90,7 +90,12 @@ bb_getopt_ulflags (int argc, char **argv, const char *applet_opts, ...)
90 90
91 va_start (p, applet_opts); 91 va_start (p, applet_opts);
92 92
93 for (s = applet_opts; *s; s++) { 93 /* skip GNU extension */
94 s = applet_opts;
95 if(*s == '+' || *s == '-')
96 s++;
97
98 for (; *s; s++) {
94 c++; 99 c++;
95 while (s[1] == ':') { 100 while (s[1] == ':') {
96 /* check GNU extension "o::" - optional arg */ 101 /* check GNU extension "o::" - optional arg */
@@ -99,7 +104,12 @@ bb_getopt_ulflags (int argc, char **argv, const char *applet_opts, ...)
99 } 104 }
100 complementaly = xcalloc (c + 1, sizeof (t_complementaly)); 105 complementaly = xcalloc (c + 1, sizeof (t_complementaly));
101 c = 0; 106 c = 0;
102 for (s = applet_opts; *s; s++) { 107 /* skip GNU extension */
108 s = applet_opts;
109 if(*s == '+' || *s == '-')
110 s++;
111
112 for (; *s; s++) {
103 complementaly->opt = *s; 113 complementaly->opt = *s;
104 complementaly->switch_on |= (1 << c); 114 complementaly->switch_on |= (1 << c);
105 c++; 115 c++;
diff --git a/networking/httpd.c b/networking/httpd.c
index e5ad7f65e..ba65e1361 100644
--- a/networking/httpd.c
+++ b/networking/httpd.c
@@ -1452,7 +1452,9 @@ static int checkPerm(const char *path, const char *request)
1452 } 1452 }
1453#endif 1453#endif
1454 if (strcmp(p, request) == 0) { 1454 if (strcmp(p, request) == 0) {
1455#ifdef CONFIG_FEATURE_HTTPD_AUTH_MD5
1455set_remoteuser_var: 1456set_remoteuser_var:
1457#endif
1456 config->remoteuser = strdup(request); 1458 config->remoteuser = strdup(request);
1457 if(config->remoteuser) 1459 if(config->remoteuser)
1458 config->remoteuser[(u - request)] = 0; 1460 config->remoteuser[(u - request)] = 0;