netcmd/ldapcmp: fix wrong way for string copy