diff options
-rw-r--r-- | source3/lib/dprintf.c | 4 |
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 */ |