mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-14 13:30:01 +00:00
dm: refine 'assert' in inout.c and post.c
- 'assert' cleanup to avoid possible software vulnerabilities. Tracked-On: #3252 Signed-off-by: Yonghua Huang <yonghua.huang@intel.com> Reviewed-by: Shuo A Liu <shuo.a.liu@intel.com>
This commit is contained in:
@@ -26,8 +26,6 @@
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include "inout.h"
|
||||
#include "lpc.h"
|
||||
|
||||
@@ -35,9 +33,7 @@ static int
|
||||
post_data_handler(struct vmctx *ctx, int vcpu, int in, int port, int bytes,
|
||||
uint32_t *eax, void *arg)
|
||||
{
|
||||
assert(in == 1);
|
||||
|
||||
if (bytes != 1)
|
||||
if ((in != 1) || (bytes != 1))
|
||||
return -1;
|
||||
|
||||
*eax = 0xff; /* return some garbage */
|
||||
|
Reference in New Issue
Block a user