summaryrefslogtreecommitdiff
path: root/source3/lib/dprintf.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-09-18 20:20:07 +0200
committerVolker Lendecke <vl@samba.org>2009-09-18 20:20:39 +0200
commit77afcad8f09b50977f4b88b68d66ebd61b7ffa82 (patch)
treece8a0dec1acaa8213813612c1b01bd8c37da62b6 /source3/lib/dprintf.c
parent30a4695b273613f8a62cf195a3764a923820f131 (diff)
downloadsamba-77afcad8f09b50977f4b88b68d66ebd61b7ffa82.tar.gz
samba-77afcad8f09b50977f4b88b68d66ebd61b7ffa82.tar.bz2
samba-77afcad8f09b50977f4b88b68d66ebd61b7ffa82.zip
s3: Fix Coverity ID 581 -- NEGATIVE_RETURNS
Diffstat (limited to 'source3/lib/dprintf.c')
-rw-r--r--source3/lib/dprintf.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/lib/dprintf.c b/source3/lib/dprintf.c
index 631c45a807..835d34076e 100644
--- a/source3/lib/dprintf.c
+++ b/source3/lib/dprintf.c
@@ -66,6 +66,10 @@ again:
}
clen = convert_string(CH_UNIX, CH_DISPLAY, p, ret, p2, maxlen, True);
+ if (clen == -1) {
+ ret = -1;
+ goto out;
+ }
if (clen >= maxlen) {
/* it didn't fit - try a larger buffer */