diff options
author | Dimitri Staessens <dimitri@ouroboros.rocks> | 2023-08-13 17:44:50 +0200 |
---|---|---|
committer | Sander Vrijders <sander@ouroboros.rocks> | 2023-08-23 13:09:10 +0200 |
commit | 6c66441bded4e0d413ee8aedd98da84169cdf270 (patch) | |
tree | 7dc072750daf6a577bd0634e077a3f35177c1217 /src/lib/shm_rdrbuff.c | |
parent | 3b39928f2a29aab3c93283d29cf4ab5e4cf6c16c (diff) | |
download | ouroboros-6c66441bded4e0d413ee8aedd98da84169cdf270.tar.gz ouroboros-6c66441bded4e0d413ee8aedd98da84169cdf270.zip |
lib: Fix lengths of shared memory objects
Seems like all shared memory objects were truncated to a size that
came up a byte short.
Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks>
Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
Diffstat (limited to 'src/lib/shm_rdrbuff.c')
-rw-r--r-- | src/lib/shm_rdrbuff.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/shm_rdrbuff.c b/src/lib/shm_rdrbuff.c index 46b2a6f7..56ae484e 100644 --- a/src/lib/shm_rdrbuff.c +++ b/src/lib/shm_rdrbuff.c @@ -173,7 +173,7 @@ static struct shm_rdrbuff * rdrb_create(int flags) if (fd == -1) goto fail_open; - if ((flags & O_CREAT) && ftruncate(fd, SHM_FILE_SIZE - 1) < 0) + if ((flags & O_CREAT) && ftruncate(fd, SHM_FILE_SIZE) < 0) goto fail_truncate; shm_base = mmap(NULL, SHM_FILE_SIZE, MM_FLAGS, MAP_SHARED, fd, 0); |