git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3963110
)
don't allow newlines in printer status messages
author
Andrew Tridgell
<tridge@samba.org>
Tue, 13 Aug 1996 09:00:11 +0000
(09:00 +0000)
committer
Andrew Tridgell
<tridge@samba.org>
Tue, 13 Aug 1996 09:00:11 +0000
(09:00 +0000)
(This used to be commit
d84f5402fded4ffb9c2735fecaa47ec3d2c636c0
)
source3/printing/printing.c
patch
|
blob
|
history
diff --git
a/source3/printing/printing.c
b/source3/printing/printing.c
index 7ffded8e91e0dfbc86f24a8c625c465619572ecf..00df859e0ab752dff144cdff67e04facd525d170 100644
(file)
--- a/
source3/printing/printing.c
+++ b/
source3/printing/printing.c
@@
-714,7
+714,10
@@
static BOOL parse_lpq_entry(int snum,char *line,
#endif
/* We don't want the newline in the status message. */
- line[strcspn(line,"\n")] = (char)NULL;
+ {
+ char *p = strchr(line,'\n');
+ if (p) *p = 0;
+ }
if (status && !ret)
{