Skip to content

Commit

Permalink
[mono][debugger] Fixing len as unsigned int and comparing < 0 (#47667)
Browse files Browse the repository at this point in the history
This error was introduced in my last PR about icordebug implementation. Fixing it as @lambdageek told me that it was reported on coverity scan.

Co-authored-by: thaystg <thaystg@users.noreply.github.com>
  • Loading branch information
monojenkins and thaystg authored Jan 31, 2021
1 parent e6f093c commit 025c4d0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/mono/mono/mini/debugger-protocol.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ m_dbgprot_decode_string (uint8_t *buf, uint8_t **endbuf, uint8_t *limit)
}

uint8_t*
m_dbgprot_decode_byte_array (uint8_t *buf, uint8_t **endbuf, uint8_t *limit, uint32_t *len)
m_dbgprot_decode_byte_array (uint8_t *buf, uint8_t **endbuf, uint8_t *limit, int *len)
{
*len = m_dbgprot_decode_int (buf, &buf, limit);
uint8_t* s;
Expand Down
2 changes: 1 addition & 1 deletion src/mono/mono/mini/debugger-protocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ int m_dbgprot_decode_int (uint8_t *buf, uint8_t **endbuf, uint8_t *limit);
int64_t m_dbgprot_decode_long (uint8_t *buf, uint8_t **endbuf, uint8_t *limit);
int m_dbgprot_decode_id (uint8_t *buf, uint8_t **endbuf, uint8_t *limit);
char* m_dbgprot_decode_string (uint8_t *buf, uint8_t **endbuf, uint8_t *limit);
uint8_t* m_dbgprot_decode_byte_array(uint8_t* buf, uint8_t** endbuf, uint8_t* limit, uint32_t* len);
uint8_t* m_dbgprot_decode_byte_array(uint8_t *buf, uint8_t **endbuf, uint8_t *limit, int *len);

/*
* Functions to encode protocol data
Expand Down

0 comments on commit 025c4d0

Please sign in to comment.