smbclient: fix string formatting in print command
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Tue, 1 Nov 2016 01:18:38 +0000 (14:18 +1300)
committerJeremy Allison <jra@samba.org>
Thu, 1 Dec 2016 01:02:19 +0000 (02:02 +0100)
commit737599268fb8959c83fe50158fe1ea3d8c2f0603
treef6df3bfa157bcdcc3b2e0cd7e347c5e6ace48d30
parentc98bdf24941ad95250d79eeed26c57d600cedc7b
smbclient: fix string formatting in print command

At one time, the variables lname and rname were char arrays, but now they
are pointers. When they were arrays, sizeof(rname) was the length of the
array, but now it gives the size of the pointer which is not what we want.

In the case where the filename is -, rname was alloced as size 1, which
could never fit the name it wanted to have contain ("stdin-<pid>").

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Jeremy Allison <jra@samba.org>
source4/client/client.c