mirror of
https://github.com/cemu-project/idapython.git
synced 2024-11-30 21:14:20 +01:00
kernwin.i: Copying strings with strcpy is baad. Thanks Elias for the patch!
This commit is contained in:
parent
39d692c258
commit
08ea62d8fa
@ -157,8 +157,6 @@ char * idaapi choose_getl(void *self, uint32 n, char *buf)
|
|||||||
PyObject *pyres;
|
PyObject *pyres;
|
||||||
char *res;
|
char *res;
|
||||||
|
|
||||||
char tmp[1024];
|
|
||||||
|
|
||||||
pyres = PyObject_CallMethod((PyObject *)self, "getl", "l", n);
|
pyres = PyObject_CallMethod((PyObject *)self, "getl", "l", n);
|
||||||
|
|
||||||
if (!pyres)
|
if (!pyres)
|
||||||
@ -171,7 +169,7 @@ char * idaapi choose_getl(void *self, uint32 n, char *buf)
|
|||||||
|
|
||||||
if (res)
|
if (res)
|
||||||
{
|
{
|
||||||
strcpy(buf, res);
|
strncpy(buf, res, MAXSTR);
|
||||||
res = buf;
|
res = buf;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user