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:
46fa7ec
)
Replaced stream manipulation with EnsureCapacity.
author
Armin Novak
<armin.novak@thincast.com>
Mon, 29 Feb 2016 11:54:31 +0000
(12:54 +0100)
committer
Armin Novak
<armin.novak@thincast.com>
Mon, 29 Feb 2016 11:54:31 +0000
(12:54 +0100)
server/Sample/sfreerdp.c
patch
|
blob
|
history
diff --git
a/server/Sample/sfreerdp.c
b/server/Sample/sfreerdp.c
index
96b6c9c
..
9095f4a
100644
(file)
--- a/
server/Sample/sfreerdp.c
+++ b/
server/Sample/sfreerdp.c
@@
-441,17
+441,13
@@
BOOL tf_peer_dump_rfx(freerdp_peer* client)
while (pcap_has_next_record(pcap_rfx))
{
- BYTE* tmp = NULL;
if (!pcap_get_next_record_header(pcap_rfx, &record))
break;
- tmp = realloc(Stream_Buffer(s), record.length);
- if (!tmp)
+ if (!Stream_EnsureCapacity(s, record.length))
break;
- Stream_SetBuffer(s, tmp);
record.data = Stream_Buffer(s);
- Stream_SetCapacity(s, record.length);
pcap_get_next_record_content(pcap_rfx, &record);
Stream_SetPointer(s, Stream_Buffer(s) + Stream_Capacity(s));