Skip to content

Commit f2dd3fb

Browse files
committed
Coverity CID 468126
The datasize variable is an unsigned in, so comparing it to < 0 will never be true. There is also a printf sequence for the variable which should be %u rather than %d
1 parent c198b32 commit f2dd3fb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

xrdp/xrdp_font.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,13 +287,13 @@ xrdp_font_create(struct xrdp_wm *wm, unsigned int dpi)
287287
in_uint8s(s, 6);
288288
datasize = FONT_DATASIZE(f);
289289

290-
if (datasize < 0 || datasize > 512)
290+
if (datasize > 512)
291291
{
292292
/* shouldn't happen */
293293
LOG(LOG_LEVEL_ERROR,
294294
"xrdp_font_create: "
295295
"datasize for U+%x wrong "
296-
"width %d, height %d, datasize %d",
296+
"width %d, height %d, datasize %u",
297297
char_count, f->width, f->height, datasize);
298298
break;
299299
}

0 commit comments

Comments
 (0)