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:
063c1bc
)
Fix empty window title
author
David FORT
<contact@hardening-consulting.com>
Thu, 7 May 2015 13:08:00 +0000
(15:08 +0200)
committer
David FORT
<contact@hardening-consulting.com>
Thu, 7 May 2015 13:08:00 +0000
(15:08 +0200)
When the size of a RAIL string was 0, we were reporting an OOM error.
libfreerdp/core/window.c
patch
|
blob
|
history
diff --git
a/libfreerdp/core/window.c
b/libfreerdp/core/window.c
index
701fc82
..
c5d2481
100644
(file)
--- a/
libfreerdp/core/window.c
+++ b/
libfreerdp/core/window.c
@@
-43,6
+43,14
@@
static BOOL rail_read_unicode_string(wStream* s, RAIL_UNICODE_STRING* unicode_st
if (Stream_GetRemainingLength(s) < new_len)
return FALSE;
+ if (!new_len)
+ {
+ free(unicode_string->string);
+ unicode_string->string = NULL;
+ unicode_string->length = 0;
+ return TRUE;
+ }
+
new_str = (BYTE*) realloc(unicode_string->string, new_len);
if (!new_str)
{