Package: valgrind Version: 1:3.5.0-3 Severity: normal Tags: upstream Hi,
valgrind reports a number of accesses to uninitialized memory for the attached program; I believe the program to be correct. Simon -- System Information: Debian Release: squeeze/sid APT prefers unstable APT policy: (500, 'unstable'), (500, 'stable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 2.6.32-5-amd64 (SMP w/2 CPU cores) Locale: LANG=ja_JP.UTF-8, LC_CTYPE=ja_JP.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages valgrind depends on: ii libc6 2.11.2-2 Embedded GNU C Library: Shared lib ii libc6-dbg 2.11.2-2 Embedded GNU C Library: detached d Versions of packages valgrind recommends: ii gdb 7.1-1+b1 The GNU Debugger Versions of packages valgrind suggests: pn alleyoop <none> (no description available) pn kcachegrind <none> (no description available) pn valkyrie <none> (no description available) -- no debconf information
#include <dirent.h> #include <stdio.h> int main(int argc, char *argv[]) { if(argc != 2) return 1; DIR *dir = opendir(argv[1]); if(!dir) return 1; struct dirent *ent; while((ent = readdir(dir))) { printf("%s ", ent->d_name); } printf("\n"); }