Index: client/client.c =================================================================== --- client/client.c (revision 18196) +++ client/client.c (working copy) @@ -3199,7 +3199,7 @@ info.matches[0] = SMB_STRDUP(info.matches[1]); else { info.matches[0] = (char *)SMB_MALLOC(info.samelen+1); - if (!info.matches[0]) + if (!info.matches[0] || !info.matches[1]) goto cleanup; strncpy(info.matches[0], info.matches[1], info.samelen); info.matches[0][info.samelen] = 0;