mirror of
https://github.com/monero-project/monero.git
synced 2025-01-12 05:44:49 +00:00
Merge pull request #423
234f576
miniupnpc: quick fix for buffer overflow (moneromooo-monero)
This commit is contained in:
commit
28cb856b33
1 changed files with 4 additions and 0 deletions
4
external/miniupnpc/igd_desc_parse.c
vendored
4
external/miniupnpc/igd_desc_parse.c
vendored
|
@ -15,6 +15,10 @@
|
|||
void IGDstartelt(void * d, const char * name, int l)
|
||||
{
|
||||
struct IGDdatas * datas = (struct IGDdatas *)d;
|
||||
if (l >= MINIUPNPC_URL_MAXSIZE) {
|
||||
printf("Attempt to exploit miniupnpc buffer overflow\n");
|
||||
l = MINIUPNPC_URL_MAXSIZE - 1;
|
||||
}
|
||||
memcpy( datas->cureltname, name, l);
|
||||
datas->cureltname[l] = '\0';
|
||||
datas->level++;
|
||||
|
|
Loading…
Reference in a new issue