From 7ef19ee4bcb089c4894a864b1348f81a1dd07cd0 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 13 Aug 1996 09:00:11 +0000 Subject: [PATCH] don't allow newlines in printer status messages (This used to be commit d84f5402fded4ffb9c2735fecaa47ec3d2c636c0) --- source3/printing/printing.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source3/printing/printing.c b/source3/printing/printing.c index 7ffded8e91e..00df859e0ab 100644 --- 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) { -- 2.34.1