aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-spnego.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/packet-spnego.c')
-rw-r--r--epan/dissectors/packet-spnego.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/epan/dissectors/packet-spnego.c b/epan/dissectors/packet-spnego.c
index 90b3a9d9d1..3033b17c41 100644
--- a/epan/dissectors/packet-spnego.c
+++ b/epan/dissectors/packet-spnego.c
@@ -1137,10 +1137,13 @@ rrc_rotate(void *data, int len, guint16 rrc, int unrotate)
left = len - rrc;
- if (rrc <= sizeof(buf))
+ if (rrc <= sizeof(buf)) {
tmp = buf;
- else
+ } else {
tmp = g_malloc(rrc);
+ if (tmp == NULL)
+ return -1;
+ }
if (unrotate) {
memcpy(tmp, data, rrc);