Avoid a potential memory corruption on little-endian architectures
This commit is contained in:
parent
edd3dfac1f
commit
612ae35447
|
@ -1116,6 +1116,11 @@ static int _post_exec_out(AppInterfaceCallArg * aica, char buf[], size_t buflen,
|
||||||
Buffer * b;
|
Buffer * b;
|
||||||
uint32_t size;
|
uint32_t size;
|
||||||
|
|
||||||
|
if(aica->size > buflen)
|
||||||
|
{
|
||||||
|
errno = ENOBUFS;
|
||||||
|
return -error_set_code(1, "%s", strerror(ENOBUFS));
|
||||||
|
}
|
||||||
switch(aica->type)
|
switch(aica->type)
|
||||||
{
|
{
|
||||||
case AICT_VOID:
|
case AICT_VOID:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user