aboutsummaryrefslogtreecommitdiff
path: root/librt
diff options
context:
space:
mode:
authorGravatar Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>2009-07-03 00:20:19 +0200
committerGravatar Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>2009-07-03 00:20:19 +0200
commiteac5e6eee91332c3c98f4c5a3ee2d55ec1723d81 (patch)
tree78aa48b98d7b89d2dce43f66983981ab38b9b90a /librt
parenta98934adc9277d1dea52b929d59c6b15ccf115a2 (diff)
downloaduClibc-eac5e6eee91332c3c98f4c5a3ee2d55ec1723d81.tar.gz
uClibc-eac5e6eee91332c3c98f4c5a3ee2d55ec1723d81.tar.bz2
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')
-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;