mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
StartHTML and EndHTML values can be left-padded with 0 characters. strtol and friends treat this as base-8 if base is specified as 0.
Because these values are always sent in base-10, fix is to always use base-10
This commit is contained in:
@@ -439,12 +439,12 @@ static void* clipboard_synthesize_text_html(wClipboard* clipboard, UINT32 format
|
||||
return NULL;
|
||||
|
||||
errno = 0;
|
||||
beg = strtol(&begStr[10], NULL, 0);
|
||||
beg = strtol(&begStr[10], NULL, 10);
|
||||
|
||||
if (errno != 0)
|
||||
return NULL;
|
||||
|
||||
end = strtol(&endStr[8], NULL, 0);
|
||||
end = strtol(&endStr[8], NULL, 10);
|
||||
|
||||
if (beg < 0 || end < 0 || (beg > SrcSize) || (end > SrcSize) || (beg >= end) || (errno != 0))
|
||||
return NULL;
|
||||
|
||||
Reference in New Issue
Block a user