summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/client/client.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source4/client/client.c b/source4/client/client.c
index 43b0903cdc..66c21dfc54 100644
--- a/source4/client/client.c
+++ b/source4/client/client.c
@@ -454,7 +454,13 @@ static void adjust_do_list_queue(void)
static void add_to_do_list_queue(const char* entry)
{
char *dlq;
- long new_end = do_list_queue_end + ((long)strlen(entry)) + 1;
+ long new_end;
+
+ if (entry == NULL) {
+ entry = "";
+ }
+
+ new_end = do_list_queue_end + ((long)strlen(entry)) + 1;
while (new_end > do_list_queue_size)
{
do_list_queue_size *= 2;
@@ -475,7 +481,7 @@ static void add_to_do_list_queue(const char* entry)
}
if (do_list_queue)
{
- strlcpy(do_list_queue + do_list_queue_end, entry ? entry : "",
+ strlcpy(do_list_queue + do_list_queue_end, entry,
do_list_queue_size - do_list_queue_end);
do_list_queue_end = new_end;
DEBUG(4,("added %s to do_list_queue (start=%d, end=%d)\n",