Fix commit 04e2c83f.
authorWerner Koch <wk@gnupg.org>
Wed, 28 Aug 2013 15:58:43 +0000 (17:58 +0200)
committerWerner Koch <wk@gnupg.org>
Wed, 28 Aug 2013 15:58:43 +0000 (17:58 +0200)
* agent/command-ssh.c (stream_read_string): Do not assign to a NULL
ptr.

agent/command-ssh.c

index 0ff70b5..8f8e285 100644 (file)
@@ -487,7 +487,8 @@ stream_read_string (estream_t stream, unsigned int secure,
   unsigned char *buffer = NULL;
   u32 length = 0;
 
-  *string_size = 0;
+  if (string_size)
+    *string_size = 0;
 
   /* Read string length.  */
   err = stream_read_uint32 (stream, &length);