Fixed use of uninitialized memory.
authorNikolaus Rath <Nikolaus@rath.org>
Sat, 24 Dec 2016 02:31:34 +0000 (18:31 -0800)
committerNikolaus Rath <Nikolaus@rath.org>
Sat, 24 Dec 2016 02:31:34 +0000 (18:31 -0800)
example/null.c

index 62ae3d441c84a86226cb6ccb5ffd5275efae82a8..5e8ebdaed42f91f0c27158e980f24cfb8e1a8902 100644 (file)
@@ -85,6 +85,7 @@ static int null_read(const char *path, char *buf, size_t size,
        if (offset >= (1ULL << 32))
                return 0;
 
+       memset(buf, 0, size);
        return size;
 }