summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/printing/printing.c4
-rw-r--r--source3/web/cgi.c2
2 files changed, 4 insertions, 2 deletions
diff --git a/source3/printing/printing.c b/source3/printing/printing.c
index 2aecb58047..09a574c2c9 100644
--- a/source3/printing/printing.c
+++ b/source3/printing/printing.c
@@ -323,8 +323,10 @@ static BOOL parse_lpq_lprng(char *line,print_queue_struct *buf,BOOL first)
char *tokarr[LPRNG_MAXTOK];
char *cptr;
int num_tok = 0;
+ pstring line2;
- tokarr[0] = strtok(line," \t");
+ pstrcpy(line2,line);
+ tokarr[0] = strtok(line2," \t");
num_tok++;
while (((tokarr[num_tok] = strtok(NULL," \t")) != NULL)
&& (num_tok < LPRNG_MAXTOK)) {
diff --git a/source3/web/cgi.c b/source3/web/cgi.c
index 86366d1083..41d099bac9 100644
--- a/source3/web/cgi.c
+++ b/source3/web/cgi.c
@@ -411,7 +411,7 @@ void cgi_setup(char *rootdir, int auth_required)
char *x;
/* Save the users name if available */
- if (x = getenv("REMOTE_USER")) {
+ if ((x = getenv("REMOTE_USER"))!=NULL) {
C_user = strdup(x);
} else {
C_user = "";