diff options
author | Josh Morman <jmorman@perspectalabs.com> | 2021-03-24 17:40:36 -0400 |
---|---|---|
committer | Marcus Müller <marcus@hostalia.de> | 2021-03-25 13:32:11 +0100 |
commit | 01de47a2dc75f7f0ce3e8077084c85182601e35f (patch) | |
tree | 8ae611c9034560b88cb019517a71f11729753c00 /gnuradio-runtime/lib/vmcircbuf.h | |
parent | 818c24ad607a544a12400744fc965d1e78f7b3b1 (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.h')
-rw-r--r-- | gnuradio-runtime/lib/vmcircbuf.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gnuradio-runtime/lib/vmcircbuf.h b/gnuradio-runtime/lib/vmcircbuf.h index 192f9b32bd..75fca25567 100644 --- a/gnuradio-runtime/lib/vmcircbuf.h +++ b/gnuradio-runtime/lib/vmcircbuf.h @@ -72,7 +72,7 @@ public: * * Call this to create a doubly mapped circular buffer. */ - virtual vmcircbuf* make(int size) = 0; + virtual vmcircbuf* make(size_t size) = 0; }; /* @@ -90,7 +90,7 @@ public: static vmcircbuf_factory* get_default_factory(); static int granularity() { return get_default_factory()->granularity(); } - static vmcircbuf* make(int size) { return get_default_factory()->make(size); } + static vmcircbuf* make(size_t size) { return get_default_factory()->make(size); } // N.B. not all factories are guaranteed to work. // It's too hard to check everything at config time, so we check at runtime |