summaryrefslogtreecommitdiff
path: root/gnuradio-runtime/lib/vmcircbuf_createfilemapping.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_createfilemapping.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_createfilemapping.cc')
-rw-r--r--gnuradio-runtime/lib/vmcircbuf_createfilemapping.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/gnuradio-runtime/lib/vmcircbuf_createfilemapping.cc b/gnuradio-runtime/lib/vmcircbuf_createfilemapping.cc
index 463f0a3bb6..08be14987a 100644
--- a/gnuradio-runtime/lib/vmcircbuf_createfilemapping.cc
+++ b/gnuradio-runtime/lib/vmcircbuf_createfilemapping.cc
@@ -49,7 +49,8 @@ static void werror(char* where, DWORD last_error)
#endif
-vmcircbuf_createfilemapping::vmcircbuf_createfilemapping(int size) : gr::vmcircbuf(size)
+vmcircbuf_createfilemapping::vmcircbuf_createfilemapping(size_t size)
+ : gr::vmcircbuf(size)
{
gr::configure_default_loggers(
d_logger, d_debug_logger, "vmcircbuf_createfilemapping");
@@ -195,7 +196,7 @@ int vmcircbuf_createfilemapping_factory::granularity()
#endif
}
-gr::vmcircbuf* vmcircbuf_createfilemapping_factory::make(int size)
+gr::vmcircbuf* vmcircbuf_createfilemapping_factory::make(size_t size)
{
try {
return new vmcircbuf_createfilemapping(size);