Staging
v0.5.1
https://github.com/python/cpython
Revision c9cb18d3f7e5bf03220c213183ff0caa75905bdd authored by Georg Brandl on 30 September 2014, 12:12:24 UTC, committed by Georg Brandl on 30 September 2014, 12:12:24 UTC
limiting the call to readline().  Original patch by Michał
Jastrzębski and Giampaolo Rodola.
1 parent f0746ca
Raw File
Tip revision: c9cb18d3f7e5bf03220c213183ff0caa75905bdd authored by Georg Brandl on 30 September 2014, 12:12:24 UTC
Issue #16038: CVE-2013-1752: ftplib: Limit amount of data read by
Tip revision: c9cb18d
dynload_dl.c

/* Support for dynamic loading of extension modules */

#include "dl.h"

#include "Python.h"
#include "importdl.h"


extern char *Py_GetProgramName(void);

const struct filedescr _PyImport_DynLoadFiletab[] = {
	{".o", "rb", C_EXTENSION},
	{"module.o", "rb", C_EXTENSION},
	{0, 0}
};


dl_funcptr _PyImport_GetDynLoadFunc(const char *fqname, const char *shortname,
				    const char *pathname, FILE *fp)
{
	char funcname[258];

	PyOS_snprintf(funcname, sizeof(funcname), "PyInit_%.200s", shortname);
	return dl_loadmod(Py_GetProgramName(), pathname, funcname);
}
back to top