mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00:00
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:
parent
44adc8be1b
commit
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';
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user