summaryrefslogtreecommitdiff
path: root/gnuradio-runtime/lib/vmcircbuf_mmap_tmpfile.cc
diff options
context:
space:
mode:
authorJosh Morman <jmorman@perspectalabs.com>2021-03-24 17:40:36 -0400
committerMarcus Müller <marcus@hostalia.de>2021-03-25 13:32:11 +0100
commit01de47a2dc75f7f0ce3e8077084c85182601e35f (patch)
tree8ae611c9034560b88cb019517a71f11729753c00 /gnuradio-runtime/lib/vmcircbuf_mmap_tmpfile.cc
parent818c24ad607a544a12400744fc965d1e78f7b3b1 (diff)
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>
Diffstat (limited to 'gnuradio-runtime/lib/vmcircbuf_mmap_tmpfile.cc')
-rw-r--r--gnuradio-runtime/lib/vmcircbuf_mmap_tmpfile.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/gnuradio-runtime/lib/vmcircbuf_mmap_tmpfile.cc b/gnuradio-runtime/lib/vmcircbuf_mmap_tmpfile.cc
index db4dce47c4..2838fd4f0e 100644
--- a/gnuradio-runtime/lib/vmcircbuf_mmap_tmpfile.cc
+++ b/gnuradio-runtime/lib/vmcircbuf_mmap_tmpfile.cc
@@ -32,7 +32,7 @@
namespace gr {
-vmcircbuf_mmap_tmpfile::vmcircbuf_mmap_tmpfile(int size) : gr::vmcircbuf(size)
+vmcircbuf_mmap_tmpfile::vmcircbuf_mmap_tmpfile(size_t size) : gr::vmcircbuf(size)
{
#if !defined(HAVE_MMAP)
GR_LOG_ERROR(d_logger, "mmap or mkstemp is not available");
@@ -170,7 +170,7 @@ gr::vmcircbuf_factory* vmcircbuf_mmap_tmpfile_factory::singleton()
int vmcircbuf_mmap_tmpfile_factory::granularity() { return gr::pagesize(); }
-gr::vmcircbuf* vmcircbuf_mmap_tmpfile_factory::make(int size)
+gr::vmcircbuf* vmcircbuf_mmap_tmpfile_factory::make(size_t size)
{
try {
return new vmcircbuf_mmap_tmpfile(size);