+2007-03-26 13:58 Christos Zoulas <christos@zoulas.com>
+
+ * make sure that all of struct magic_set is initialized appropriately
+ (Brett)
+
2007-03-25 17:44 Christos Zoulas <christos@zoulas.com>
* reset left bytes in the buffer (Dmitry V. Levin)
#include "patchlevel.h"
#ifndef lint
-FILE_RCSID("@(#)$File: magic.c,v 1.39 2007/02/05 16:46:40 christos Exp $")
+FILE_RCSID("@(#)$File: magic.c,v 1.40 2007/03/01 22:14:55 christos Exp $")
#endif /* lint */
#ifdef __EMX__
{
struct magic_set *ms;
- if ((ms = malloc(sizeof(struct magic_set))) == NULL)
+ if ((ms = calloc((size_t)1, sizeof(struct magic_set))) == NULL)
return NULL;
if (magic_setflags(ms, flags) == -1) {
ms->haderr = 0;
ms->error = -1;
ms->mlist = NULL;
+ ms->file = "unknown";
+ ms->line = 0;
return ms;
free3:
free(ms->o.pbuf);