diff mbox series

[COMMITTED] linux: Fix __sem_check_add_mapping search_sem

Message ID 20210209190315.1901653-1-adhemerval.zanella@linaro.org
State New
Headers show
Series [COMMITTED] linux: Fix __sem_check_add_mapping search_sem | expand

Commit Message

Adhemerval Zanella Netto Feb. 9, 2021, 7:03 p.m. UTC
Similar to __sem_check_add_mapping fix, take in consideration the
trailling NULL.

Checked x86_64-linux-gnu.
---
 sysdeps/pthread/sem_routines.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/sysdeps/pthread/sem_routines.c b/sysdeps/pthread/sem_routines.c
index c2c8b54cd0..34e6410729 100644
--- a/sysdeps/pthread/sem_routines.c
+++ b/sysdeps/pthread/sem_routines.c
@@ -37,7 +37,7 @@  struct search_sem
   ino_t ino;
   int refcnt;
   sem_t *sem;
-  char name[NAME_MAX];
+  char name[NAME_MAX + 1];
 };
 
 /* Comparison function for search of existing mapping.  */