view osdep/glob.h @ 26267:430da0c9fcce

Fix possible integer overflow in malloc by using calloc instead. Should fix CVE-2008-0073 as far as MPlayer is affected by this problem.
author reimar
date Sat, 29 Mar 2008 11:35:29 +0000
parents 32ef0c7cb949
children 5cfef41a1771
line wrap: on
line source

#ifndef MPLAYER_GLOB_H
#define MPLAYER_GLOB_H

#include <sys/types.h>
#include "config.h"

typedef struct {
  size_t gl_pathc;
  char **gl_pathv;
  size_t gl_offs;
} glob_t;

void globfree(glob_t *pglob);

int  glob(const char *pattern, int flags, int (*errfunc)(const char *epath, int eerrno), glob_t *pglob);

#endif /* MPLAYER_GLOB_H */