pkgsrc/audio/mp3blaster/patches/patch-aq

13 lines
493 B
Text

$NetBSD: patch-aq,v 1.1 2005/12/11 22:22:37 joerg Exp $
--- src/fileman.cc.orig 2005-12-11 22:08:19.000000000 +0000
+++ src/fileman.cc
@@ -212,7 +212,7 @@ fileManager::readDir()
PTH_YIELD;
entries = (char **)realloc (entries, (++diritems) * sizeof(char *));
- entries[diritems - 1] = (char *)malloc( ((entry->d_reclen) + 1) *
+ entries[diritems - 1] = (char *)malloc( (sizeof(*entry) + entry->d_namlen + 1) *
sizeof(char));
strcpy(entries[diritems - 1], entry->d_name);
}