From 01de47a2dc75f7f0ce3e8077084c85182601e35f Mon Sep 17 00:00:00 2001
From: Josh Morman <jmorman@perspectalabs.com>
Date: Wed, 24 Mar 2021 17:40:36 -0400
Subject: runtime: buffer factories use size_t

Addresses the issue where large buffer size requests get converted back
and forth to signed/unsigned and can cause an overflow and the buffer
allocation to fail

Signed-off-by: Josh Morman <jmorman@perspectalabs.com>
---
 gnuradio-runtime/lib/vmcircbuf_mmap_shm_open.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'gnuradio-runtime/lib/vmcircbuf_mmap_shm_open.cc')

diff --git a/gnuradio-runtime/lib/vmcircbuf_mmap_shm_open.cc b/gnuradio-runtime/lib/vmcircbuf_mmap_shm_open.cc
index 87699ee0f8..0741b0663e 100644
--- a/gnuradio-runtime/lib/vmcircbuf_mmap_shm_open.cc
+++ b/gnuradio-runtime/lib/vmcircbuf_mmap_shm_open.cc
@@ -30,7 +30,7 @@
 
 namespace gr {
 
-vmcircbuf_mmap_shm_open::vmcircbuf_mmap_shm_open(int size) : gr::vmcircbuf(size)
+vmcircbuf_mmap_shm_open::vmcircbuf_mmap_shm_open(size_t size) : gr::vmcircbuf(size)
 {
 #if !defined(HAVE_MMAP) || !defined(HAVE_SHM_OPEN)
     std::stringstream error_msg;
@@ -178,7 +178,7 @@ gr::vmcircbuf_factory* vmcircbuf_mmap_shm_open_factory::singleton()
 
 int vmcircbuf_mmap_shm_open_factory::granularity() { return gr::pagesize(); }
 
-gr::vmcircbuf* vmcircbuf_mmap_shm_open_factory::make(int size)
+gr::vmcircbuf* vmcircbuf_mmap_shm_open_factory::make(size_t size)
 {
     try {
         return new vmcircbuf_mmap_shm_open(size);
-- 
cgit v1.2.3