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:51:12 +0200 |
commit | cfa74c1dc63851a29b50bbaa1b58f878a55107b9 (patch) | |
tree | 843f3bcc8c74315a93f143e70e682781b8747c46 | |
parent | de706de8c3f67ae8408b2c8be139d177ef5d567c (diff) | |
download | libssh-cfa74c1dc63851a29b50bbaa1b58f878a55107b9.tar.gz libssh-cfa74c1dc63851a29b50bbaa1b58f878a55107b9.tar.xz libssh-cfa74c1dc63851a29b50bbaa1b58f878a55107b9.zip |
string: Added missing errno.
(cherry picked from commit d536cc4f399eabb0ca3dec5bf8b2bf2dc168bf60)
-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; } |