From b70f23c2b581c5d455362ab37f4846de9a910055 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 8 Aug 2012 17:01:00 -0700 Subject: Correctly check for errors in strlower_m() returns. --- source3/printing/lpq_parse.c | 4 +++- source3/printing/nt_printing_tdb.c | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'source3/printing') diff --git a/source3/printing/lpq_parse.c b/source3/printing/lpq_parse.c index 21e7b37faf..91fc2ead71 100644 --- a/source3/printing/lpq_parse.c +++ b/source3/printing/lpq_parse.c @@ -1117,7 +1117,9 @@ bool parse_lpq_entry(enum printing_types printing_type,char *line, printer status line: handle them so that most severe condition is shown */ int i; - strlower_m(line); + if (!strlower_m(line)) { + return false; + } switch (status->status) { case LPSTAT_OK: diff --git a/source3/printing/nt_printing_tdb.c b/source3/printing/nt_printing_tdb.c index 028dc0b1da..870231af8c 100644 --- a/source3/printing/nt_printing_tdb.c +++ b/source3/printing/nt_printing_tdb.c @@ -54,7 +54,7 @@ static TDB_DATA make_printer_tdbkey(TALLOC_CTX *ctx, const char *sharename ) TDB_DATA key; fstrcpy(share, sharename); - strlower_m(share); + (void)strlower_m(share); keystr = talloc_asprintf(ctx, "%s%s", PRINTERS_PREFIX, share); key = string_term_tdb_data(keystr ? keystr : ""); @@ -74,7 +74,7 @@ static TDB_DATA make_printers_secdesc_tdbkey(TALLOC_CTX *ctx, TDB_DATA key; fstrcpy(share, sharename ); - strlower_m(share); + (void)strlower_m(share); keystr = talloc_asprintf(ctx, "%s%s", SECDESC_PREFIX, share); key = string_term_tdb_data(keystr ? keystr : ""); -- cgit