1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-11-29 01:03:57 +03:00

Fixed a bunch of smallish bugs

http://linuxtesting.org/upstream-tracker/test_results/libssh/current/test_results.html
for a whole list
This commit is contained in:
Aris Adamantiadis
2010-10-20 14:47:11 +02:00
parent 8e2699e161
commit 98221f4e36
5 changed files with 56 additions and 17 deletions

View File

@@ -131,8 +131,12 @@ size_t ssh_string_len(struct ssh_string_struct *s) {
* string may not be readable with regular libc functions.
*/
char *ssh_string_to_char(struct ssh_string_struct *s) {
size_t len = ntohl(s->size) + 1;
char *new = malloc(len);
size_t len;
char *new;
if(s==NULL)
return NULL;
len = ntohl(s->size) + 1;
new = malloc(len);
if (new == NULL) {
return NULL;