aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2009-06-21 21:53:12 +0200
committerAris Adamantiadis <aris@0xbadc0de.be>2009-06-21 21:53:12 +0200
commita3fa6f3099ba600c8c589332e73d83e9596c6361 (patch)
treec3062d029ba68e811531fa001bf886bd5b38bbf2
parent4dafc259272f868d4dadd62326449f4bca467e59 (diff)
downloadlibssh-a3fa6f3099ba600c8c589332e73d83e9596c6361.tar.gz
libssh-a3fa6f3099ba600c8c589332e73d83e9596c6361.tar.xz
libssh-a3fa6f3099ba600c8c589332e73d83e9596c6361.zip
fix stupid "use unallocated memory" code in sample
it confused valgrind and wasted 2 precious hours of my life
-rw-r--r--sample.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sample.c b/sample.c
index bd33baff..2b162eb4 100644
--- a/sample.c
+++ b/sample.c
@@ -284,7 +284,7 @@ void do_sftp(SSH_SESSION *session){
SFTP_FILE *to;
int len=1;
int i;
- char data[8000];
+ char data[8000]={0};
if(!sftp_session){
fprintf(stderr, "sftp error initialising channel: %s\n",
ssh_get_error(session));