Merge pull request #2089 from akallabeth/winpr_HexDump_fix
Fixed string size calculation in winpr_HexDump
This commit is contained in:
commit
938b83f550
@ -38,7 +38,7 @@ void winpr_HexDump(const char* tag, int level, const BYTE* data, int length)
|
||||
const BYTE* p = data;
|
||||
int i, line, offset = 0;
|
||||
const size_t llen = (length > WINPR_HEXDUMP_LINE_LENGTH) ? WINPR_HEXDUMP_LINE_LENGTH : length;
|
||||
size_t blen = 5 + llen * 5;
|
||||
size_t blen = 7 + WINPR_HEXDUMP_LINE_LENGTH * 5;
|
||||
size_t pos = 0;
|
||||
char* buffer = malloc(blen);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user