summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/XRecord.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/XRecord.c b/src/XRecord.c
index 11d23f6..32c17bb 100644
--- a/src/XRecord.c
+++ b/src/XRecord.c
@@ -745,6 +745,8 @@ parse_reply_call_callback(
*/
switch (rep->category) {
case XRecordFromServer:
+ if (reply == NULL)
+ goto out;
if (rep->elementHeader&XRecordFromServerTime) {
if (current_index + 4 > rep->length << 2)
return Error;
@@ -770,6 +772,8 @@ parse_reply_call_callback(
}
break;
case XRecordFromClient:
+ if (reply == NULL)
+ goto out;
if (rep->elementHeader&XRecordFromClientTime) {
if (current_index + 4 > rep->length << 2)
goto out;
@@ -804,6 +808,8 @@ parse_reply_call_callback(
datum_bytes <<= 2;
break;
case XRecordClientStarted:
+ if (reply == NULL)
+ goto out;
if (current_index + 8 > rep->length << 2)
goto out;
EXTRACT_CARD16(rep->clientSwapped,
@@ -812,6 +818,8 @@ parse_reply_call_callback(
break;
case XRecordClientDied:
if (rep->elementHeader&XRecordFromClientSequence) {
+ if (reply == NULL)
+ goto out;
if (current_index + 4 > rep->length << 2)
goto out;
EXTRACT_CARD32(rep->clientSwapped,