зеркало из https://github.com/github/putty.git
Add missing cast in RTF paste data construction.
udata[uindex] is a wchar_t, so if we pass it to sprintf("%d") we should cast it to int (because who knows what primitive integer type that might have corresponded to otherwise). I had done this in the first of the two sprintfs that use it, but missed the second one a few lines further on. Spotted by Coverity.
This commit is contained in:
Родитель
44adc8be1b
Коммит
4ea56076a8
|
@ -5255,7 +5255,7 @@ static void wintw_clip_write(
|
|||
(int)udata[uindex]);
|
||||
alen = 1; strcpy(after, "}");
|
||||
} else {
|
||||
blen = sprintf(before, "\\u%d", udata[uindex]);
|
||||
blen = sprintf(before, "\\u%d", (int)udata[uindex]);
|
||||
alen = 0; after[0] = '\0';
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче