projects
/
platform
/
upstream
/
freerdp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d525999
)
Fixed allocation size warning.
author
Armin Novak
<armin.novak@gmail.com>
Sun, 16 Nov 2014 22:44:10 +0000
(23:44 +0100)
committer
Armin Novak
<armin.novak@gmail.com>
Sun, 16 Nov 2014 22:44:10 +0000
(23:44 +0100)
channels/cliprdr/client/cliprdr_format.c
patch
|
blob
|
history
diff --git
a/channels/cliprdr/client/cliprdr_format.c
b/channels/cliprdr/client/cliprdr_format.c
index
6d3c9fa
..
3a52a0a
100644
(file)
--- a/
channels/cliprdr/client/cliprdr_format.c
+++ b/
channels/cliprdr/client/cliprdr_format.c
@@
-127,7
+127,7
@@
void cliprdr_process_format_list(cliprdrPlugin* cliprdr, wStream* s, UINT32 data
{
UINT32 index;
int formatNameLength;
- CLIPRDR_FORMAT* formats;
+ CLIPRDR_FORMAT* formats
= NULL
;
CLIPRDR_FORMAT_LIST formatList;
formatList.msgType = CB_FORMAT_LIST;
@@
-151,7
+151,8
@@
void cliprdr_process_format_list(cliprdrPlugin* cliprdr, wStream* s, UINT32 data
dataLen = formatList.dataLen;
Stream_Rewind(s, dataLen);
- formats = (CLIPRDR_FORMAT*) calloc(formatList.numFormats, sizeof(CLIPRDR_FORMAT));
+ if (formatList.numFormats)
+ formats = (CLIPRDR_FORMAT*) calloc(formatList.numFormats, sizeof(CLIPRDR_FORMAT));
if (!formats)
return;