mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-25 00:49:47 +00:00
net_http_update - prevent NULL pointer dereferences and return
false when erroring out
This commit is contained in:
parent
95821959a7
commit
e010a6e0bf
@ -507,11 +507,14 @@ parse_again:
|
||||
return (state->part == P_DONE);
|
||||
|
||||
fail:
|
||||
state->error = true;
|
||||
state->part = P_ERROR;
|
||||
state->status = -1;
|
||||
if (state)
|
||||
{
|
||||
state->error = true;
|
||||
state->part = P_ERROR;
|
||||
state->status = -1;
|
||||
}
|
||||
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
int net_http_status(struct http_t *state)
|
||||
|
Loading…
Reference in New Issue
Block a user