Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:20
erlang
1002-Verify-the-ref-fits-in-ei_decode_ref.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 1002-Verify-the-ref-fits-in-ei_decode_ref.patch of Package erlang
From 165a51f0cdc43bfc8f49781ae9871e8feea7b91a Mon Sep 17 00:00:00 2001 From: Rickard Green <rickard@erlang.org> Date: Wed, 29 Apr 2020 22:22:14 +0200 Subject: [PATCH 4/4] Verify the ref fits in ei_decode_ref() --- lib/erl_interface/src/decode/decode_ref.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/erl_interface/src/decode/decode_ref.c b/lib/erl_interface/src/decode/decode_ref.c index c9b38c1c3b..c10a02094e 100644 --- a/lib/erl_interface/src/decode/decode_ref.c +++ b/lib/erl_interface/src/decode/decode_ref.c @@ -54,6 +54,9 @@ int ei_decode_ref(const char *buf, int *index, erlang_ref *p) /* first the integer count */ count = get16be(s); + if (count > sizeof(p->n)/sizeof(p->n[0])) + return -1; /* Not enough space in struct... */ + if (p) { p->len = count; if (get_atom(&s, p->node, NULL) < 0) return -1; -- 2.26.1
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor