Explorar o código

note a worrying double-free possibility in torgzip.
nick?


svn:r4537

Roger Dingledine %!s(int64=20) %!d(string=hai) anos
pai
achega
4457c181f5
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/common/torgzip.c

+ 1 - 1
src/common/torgzip.c

@@ -208,7 +208,7 @@ tor_gzip_uncompress(char **out, size_t *out_len,
   *out_len = stream->total_out;
   *out_len = stream->total_out;
   if (inflateEnd(stream)!=Z_OK) {
   if (inflateEnd(stream)!=Z_OK) {
     log_fn(LOG_WARN, "Error freeing gzip structures");
     log_fn(LOG_WARN, "Error freeing gzip structures");
-    goto err;
+    goto err; /* XXX this will try to inflateEnd again, right? is that bad? */
   }
   }
   tor_free(stream);
   tor_free(stream);