#include <sys/stat.h>
#include <sys/types.h>
#include "elf.h"
+#ifdef DMALLOC
+#include <dmalloc.h>
+#endif
struct library {
char *name;
newlib = malloc(sizeof(struct library));
if (!newlib)
return 1;
- newlib->name = malloc(strlen(s));
+ newlib->name = malloc(strlen(s)+1);
strcpy(newlib->name, s);
newlib->resolved = 0;
newlib->path = NULL;
newlib = malloc(sizeof(struct library));
if (!newlib)
return;
- newlib->name = malloc(strlen(s));
+ newlib->name = malloc(strlen(s)+1);
strcpy(newlib->name, s);
newlib->path = newlib->name;
newlib->resolved = 1;