diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2011-06-06 18:50:39 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2011-06-06 18:50:39 +0200 |
commit | d536cc4f399eabb0ca3dec5bf8b2bf2dc168bf60 (patch) | |
tree | b3027955b9687f7805b7c16768ee1334b627ccec | |
parent | ee83301eb32e5a2d5783bb8c99ed0b14d76b51c1 (diff) | |
download | libssh-d536cc4f399eabb0ca3dec5bf8b2bf2dc168bf60.tar.gz libssh-d536cc4f399eabb0ca3dec5bf8b2bf2dc168bf60.tar.xz libssh-d536cc4f399eabb0ca3dec5bf8b2bf2dc168bf60.zip |
string: Added missing errno.
-rw-r--r-- | src/string.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/string.c b/src/string.c index 1959ab6f..6268d001 100644 --- a/src/string.c +++ b/src/string.c @@ -91,10 +91,11 @@ int ssh_string_fill(struct ssh_string_struct *s, const void *data, size_t len) { * @note The nul byte is not copied nor counted in the ouput string. */ struct ssh_string_struct *ssh_string_from_char(const char *what) { - struct ssh_string_struct *ptr = NULL; + struct ssh_string_struct *ptr; size_t len; - + if(what == NULL) { + errno = EINVAL; return NULL; } |