Qt windowport crashed on startup because a couple alloc() calls in files.c
were not zero'ing out the memory afterward. This resulted in uninit'd
memory access if there were no saved games. This bug is in new dev code.
}
if (n > 0) {
result = (char**)alloc((n+1)*sizeof(char*)); /* at most */
+ (void) memset((genericptr_t) result, 0, (n+1)*sizeof(char*));
if (findfirst((char *)fq_save)) {
j = n = 0;
do {
if(!(dir=opendir(fqname("save", SAVEPREFIX, 0))))
return 0;
result = (char**)alloc((n+1)*sizeof(char*)); /* at most */
+ (void) memset((genericptr_t) result, 0, (n+1)*sizeof(char*));
for (i=0, j=0; i<n; i++) {
int uid;
char name[64]; /* more than PL_NSIZ */