fix(string): handle empty string case in ssh_string_copy

Signed-off-by: Praneeth Sarode <praneethsarode@gmail.com>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Praneeth Sarode
2025-06-29 12:08:20 +05:30
committed by Jakub Jelen
parent ccb8cf88c8
commit 7a2a743a39

View File

@@ -233,9 +233,6 @@ struct ssh_string_struct *ssh_string_copy(struct ssh_string_struct *s)
}
len = ssh_string_len(s);
if (len == 0) {
return NULL;
}
new = ssh_string_new(len);
if (new == NULL) {