diff options
author | Andreas Schneider <mail@cynapses.org> | 2009-04-01 09:28:21 +0000 |
---|---|---|
committer | Andreas Schneider <mail@cynapses.org> | 2009-04-01 09:28:21 +0000 |
commit | 8758b1260bc48fd908cc4fda227bea86bc8ddfc8 (patch) | |
tree | 821e6ebbe432941de444b7ec44d11dbf34afe845 | |
parent | 04d916f3aa2ace814bb505822f762d3feef45f46 (diff) | |
download | libssh-8758b1260bc48fd908cc4fda227bea86bc8ddfc8.tar.gz libssh-8758b1260bc48fd908cc4fda227bea86bc8ddfc8.tar.xz libssh-8758b1260bc48fd908cc4fda227bea86bc8ddfc8.zip |
Fix segfaults in string.c.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@311 7dcaeef0-15fb-0310-b436-a5af3365683c
-rw-r--r-- | libssh/string.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libssh/string.c b/libssh/string.c index 10bb224..2574368 100644 --- a/libssh/string.c +++ b/libssh/string.c @@ -49,7 +49,6 @@ struct string_struct *string_new(size_t size) { if (str == NULL) { return NULL; } - ZERO_STRUCTP(str); str->size = htonl(size); return str; @@ -103,7 +102,7 @@ struct string_struct *string_from_char(const char *what) { */ size_t string_len(struct string_struct *s) { if (s == NULL) { - return 0; + return ntohl(0); } return ntohl(s->size); |