git.samba.org
/
kai
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
980a816
)
check for a valid snum when running a printing command
author
Andrew Tridgell
<tridge@samba.org>
Sun, 23 Apr 2000 08:13:12 +0000
(08:13 +0000)
committer
Andrew Tridgell
<tridge@samba.org>
Sun, 23 Apr 2000 08:13:12 +0000
(08:13 +0000)
source/printing/printing.c
patch
|
blob
|
history
diff --git
a/source/printing/printing.c
b/source/printing/printing.c
index 6e9482ad4ec3cf691bce0ea46c800ed4b8e091c3..2f36cf2f3f2fa027b6e8778b0a3665368646148f 100644
(file)
--- a/
source/printing/printing.c
+++ b/
source/printing/printing.c
@@
-140,6
+140,11
@@
static int print_run_command(int snum,char *command,
if (!command || !*command) return -1;
+ if (!VALID_SNUM(snum)) {
+ DEBUG(0,("Invalid snum %d for command %s\n", snum, command));
+ return -1;
+ }
+
pstrcpy(syscmd, command);
if (a1) pstring_sub(syscmd, a1, v1);
if (a2) pstring_sub(syscmd, a2, v2);