summaryrefslogtreecommitdiff
path: root/librt/shm.c
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2009-07-03 00:20:19 +0200
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2009-07-03 00:20:19 +0200
commiteac5e6eee91332c3c98f4c5a3ee2d55ec1723d81 (patch)
tree78aa48b98d7b89d2dce43f66983981ab38b9b90a /librt/shm.c
parenta98934adc9277d1dea52b929d59c6b15ccf115a2 (diff)
add testcases for shm_{open,unlink}
Reported-by: Mikael Lund Jepsen <mlj@iccc.dk> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'librt/shm.c')
-rw-r--r--librt/shm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/librt/shm.c b/librt/shm.c
index 3f33d68af..c7c0ee461 100644
--- a/librt/shm.c
+++ b/librt/shm.c
@@ -45,6 +45,10 @@ static char* get_shm_name(const char*name)
if (i < 0) {
free(path);
return NULL;
+ } else if (i >= NAME_MAX) {
+ free(path);
+ __set_errno(ENAMETOOLONG);
+ return NULL;
}
#endif
return path;