Fix app manager fail to install large app file issue (#555)
Remove the limit of app file size no larger than 1 MB, fix possible memory leak issues when fail to install app file, change message size of aee_host_msg_callback() from uint16 type to uint32 type to fix possible integer overflow issue, and fix some coding style issues of app manager. Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
This commit is contained in:
@ -136,7 +136,8 @@ void * am_dispatch_request(request_t *request)
|
||||
}
|
||||
|
||||
bool am_register_resource(const char *url,
|
||||
void (*request_handler)(request_t *, void *), uint32 register_id)
|
||||
void (*request_handler)(request_t *, void *),
|
||||
uint32 register_id)
|
||||
{
|
||||
app_res_register_t * r = g_resources;
|
||||
int register_num = 0;
|
||||
@ -158,7 +159,7 @@ bool am_register_resource(const char *url,
|
||||
if (register_num >= RESOURCE_REGISTRATION_NUM_MAX)
|
||||
return false;
|
||||
|
||||
r = (app_res_register_t *) APP_MGR_MALLOC(sizeof(app_res_register_t));
|
||||
r = (app_res_register_t *)APP_MGR_MALLOC(sizeof(app_res_register_t));
|
||||
if (r == NULL)
|
||||
return false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user